Running an Application in Non-Interactive Mode
Xilinx® System Debugger Command-line Interface (XSDB) provides a scriptable interface to run applications in non-interactive mode. To run the program in previous example using a script, create a tcl script (and name it as, for example, test.tcl) with the following commands. The script can be run by passing it as a launch argument to xsdb.
connect -url TCP:xhdbfarmc7:3121
# Select the target whose name starts with ARM and ends with #0.
# On Zynq, this selects “ARM Cortex-A9 MPCore #0”
targets -set -filter {name =~ "ARM* #0"}
rst
fpga ZC702_HwPlatform/design_1_wrapper.bit
loadhw ZC702_HwPlatform/system.hdf
source ZC702_HwPlatform/ps7_init.tcl
ps7_init
ps7_post_config
dow dhrystone/Debug/dhrystone.elf
# Set a breakpoint at exit
bpadd -addr &exit
# Resume execution and block until the core stops (due to breakpoint)
# or a timeout of 5 sec is reached
con -block -timeout 5