本文转载自: 硬码农二毛哥
使用KV260进行开发时会遇到这样的问题,开发板下载模式是QSPI,开发板没有设置拨码开关,如果想变换下载方式,就得修改底板电阻,我开始进行裸机调试时就用的这种方法。下面介绍一种通过tcl命令修改下载模式的方法,省去使用烙铁的麻烦。
修改步骤
1、给KV260上电,启动vitis,打开XSCT控制台。
2、进入TCL脚本目录
在控制台,输入如下命令,D:/tcl为TCL脚本所在文件目录路径。
cd D:/tcl
3、控制台输入命令
source boot.tcl
boot.tcl为TCL脚本,该脚本可设置四种模式,sd卡、jtag、qspi和emmc。
4、连接单板,在控制台输入connect
5、输入ta查看信息
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复位后,需要重新配置模式。