使用KV260进行开发时会遇到这样的问题,开发板下载模式是QSPI,开发板没有设置拨码开关,如果想变换下载方式,就得修改底板电阻,我开始进行裸机调试时就用的这种方法。下面介绍一种通过tcl命令修改下载模式的方法,省去使用烙铁的麻烦。
修改步骤
1、给KV260上电,启动vitis,打开XSCT控制台。
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-4D2deyv7-1665657477494)(./pic/1.png)]](https://i-blog.csdnimg.cn/blog_migrate/f161f72719c3ce46d6c79c26676ac784.png)
2、进入TCL脚本目录
在控制台,输入如下命令,D:/tcl为TCL脚本所在文件目录路径。
cd D:/tcl
3、控制台输入命令
source boot.tcl
boot.tcl为TCL脚本,该脚本可设置四种模式,sd卡、jtag、qspi和emmc。
4、连接单板,在控制台输入connect
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-d2oFROYx-1665657477495)(./pic/2.png)]](https://i-blog.csdnimg.cn/blog_migrate/f99314c1e9fdb01d9d6788ce8088960a.png)
5、输入ta查看信息
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-g6ftecDg-1665657477497)(./pic/3.png)]](https://i-blog.csdnimg.cn/blog_migrate/d8a8d0f551729e2f40ce57960210382c.png)
6、设置JTAG模式
输入
boot_jtag
设置成功后,可以进行裸机调试。
TCL脚本
proc boot_jtag { } {
############################
# Switch to JTAG boot mode #
############################
targets -set -filter {name =~ "PSU"}
# update multiboot to ZERO
mwr 0xffca0010 0x0
# change boot mode to JTAG
mwr 0xff5e0200 0x0100
# reset
rst -system
}
proc boot_sd { } {
############################
# Switch to SD boot mode #
############################
targets -set -filter {name =~ "PSU"}
# update multiboot to ZERO
mwr 0xffca0010 0x0
# change boot mode to SD
mwr 0xff5e0200 0xE100
# reset
rst -system
#A53 may be held in reset catch, start it with "con"
after 2000
con
}
proc boot_qspi { } {
############################
# Switch to QSPI boot mode #
############################
targets -set -filter {name =~ "PSU"}
# update multiboot to ZERO
mwr 0xffca0010 0x0
# change boot mode to QSPI
mwr 0xff5e0200 0x2100
# reset
rst -system
#A53 may be held in reset catch, start it with "con"
after 2000
con
}
proc boot_emmc { } {
############################
# Switch to emmc boot mode #
############################
targets -set -nocase -filter {name =~ "PSU"}
stop
# update multiboot to ZERO
mwr 0xffca0010 0x0
# change boot mode to EMMC
mwr 0xff5e0200 0x6100
# reset
rst -system
#A53 may be held in reset catch, start it with "con"
after 2000
con
}
其他模式设置
设置sd卡命令:boot_sd
设置qspi命令:boot_qspi
设置emmc命令:boot_emmc
对KV260复位后,需要重新配置模式。
本文介绍了一种通过TCL命令来改变KV260开发板下载模式的方法,避免了传统上需要更改硬件设置的繁琐过程。文中详细描述了如何使用特定的TCL脚本来配置JTAG、SD卡、QSPI及EMMC四种不同的启动模式。
6148





