【分享】VCK190通过JTAG实现Linux启动
【分享】VCK190通过JTAG实现Linux启动
作者: 付汉杰 hankf@xilinx.com hankf@amd.com
使用下列脚本,可以通过JTAG实现VCK190的Linux启动。
#
# https://xilinx.github.io/Embedded-Design-Tutorials/docs/2021.2/
# build/html/docs/Introduction/Versal-EDT/docs/4-boot-and-config.html
#
# bootgen -image .bif -arch versal -o BOOT.BIN
#
# https://support.xilinx.com/s/article/
# Versal-Device-Programming-Booting-Debug?language=en_US
#
connect
for {set i 0} {$i < 20} {incr i} {
if { [ta]!=""} break;
after 50
}
targets -set -nocase -filter {name =~ "*Versal*"}
targets
# Enable ISO
mwr -force 0xf1120000 0xffbff
# Switch boot mode
mwr 0xf1260200 0x0100
mrd 0xf1260200
# Set MULTIBOOT address to 0
mwr -force 0xF1110004 0x0
# Perform reset
tar -set -filter {name =~ "PMC"}
rst
# Expect BOOT MODE (Bits [15:12]): 0000 after execution.
device status jtag_status
targets -set -nocase -filter {name =~ "*Versal*"}
targets
puts stderr "INFO: Downloading BIN file: BOOT.BIN to the target."
device program "BOOT.BIN"
#after 2000
stop
after 2000
targets -set -nocase -filter {name =~ "*Versal*"}
puts stderr "INFO: Loading image: Image at 0x00200000"
dow -data -force "Image" 0x00200000
after 2000
targets -set -nocase -filter {name =~ "*Versal*"}
puts stderr "INFO: Loading image: ramdisk.cpio.gz.u-boot at 0x04000000"
dow -data -force "ramdisk.cpio.gz.u-boot" 0x04000000
after 2000
targets -set -nocase -filter {name =~ "*Versal*"}
puts stderr "INFO: Loading image: boot.scr at 0x20000000"
dow -data -force "boot.scr" 0x20000000
after2000
con
exit
puts stderr "INFO: Saving XSDB commands to versal.tcl."
puts stderr "You can run 'xsdb versal.tcl' to execute"
上述脚本,来自于下面两篇文档:
Versal: Device Programming/Booting Debug Checklist
Versal ACAP Embedded Design Tutorial -- Boot and Configuration