ザイリンクス システム デバッガー コマンドライン インターフェイス (XSDB) は、アプリケーションを非インタラクティブ モードでスクリプトを使用して実行するためのインターフェイスです。前述の例をスクリプトを使用して実行するには、次のコマンドを含む Tcl スクリプトを作成し、test.tcl などの名前を付けます。スクリプトを実行するには、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.xsa
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