Ug1208 XSCT Reference Guide
Ug1208 XSCT Reference Guide
Tool (XSCT)
Reference Guide
XSCT Commands
Target Connection Management................................................................................................. 10
Target Registers .......................................................................................................................... 15
Program Execution ..................................................................................................................... 17
Target Memory........................................................................................................................... 28
Target Download FPGA/BINARY ................................................................................................. 35
Target Reset ............................................................................................................................... 38
Target Breakpoints/Watchpoints ................................................................................................ 39
Jtag UART ................................................................................................................................... 45
Miscellaneous ............................................................................................................................ 47
JTAG Access................................................................................................................................ 55
SVF Operations........................................................................................................................... 63
SDK Projects ............................................................................................................................... 69
HSI Commands ........................................................................................................................... 96
System Requirements
If you plan to use capabilities that are offered through the Xilinx SDK or the Xilinx Software
Command-Line Tool (XSCT), then you also need to meet the hardware and software
requirements that are specific to that capability.
The following table lists the hardware and software requirements:
NOTE: Installing XSCT on Microsoft Windows operating system might require administrator rights. In
addition, your project workspace needs to be set up in any folder that you can fully access.
1. To install XSCT, double-click the Windows installer executable file.
2. The installer accepts your login credentials and allows you to select specific tool components.
The client then automatically downloads only what you have selected and installs it on your
local machine.
3. In the Select Edition to Install window, select the Xilinx Software Command-Line Tool
(XSCT) option to install XSCT as a seperate command-line tool only. Alternatively, you can
also select the Xilinx Software Development Kit (XSDK) option to install XSCT as a part of
the Xilinx SDK, an Eclipse-based integrated development environment.
4. Unless you choose otherwise, XSCT is installed in the C:\Xilinx directory.
5. To launch XSCT on Windows, select Start → Programs → Xilinx Design Tools → SDK
<version> and then select Xilinx Software Command Line Tool. Where SDK <version>
indicates the Xilinx Software Development Kit version number.
6. You can also launch XSCT from the command line.
cd C:\Xilinx\SDK\<version>\bin
xsct.bat
7. To view the available command-line options, issue the help command at the XSCT command
prompt.
****** Xilinx Software Commandline Tool (XSCT)
xsct% help
Available Help Categories
xsct%
NOTE: The procedure for installing XSCT on Linux depends on which Linux distribution you are using. Ensure
that the installation folder has the appropriate permissions. In addition, your project workspace needs to be
set up in any folder that you can fully access.
1. To install XSCT, launch the terminal and change the permission of the self-extracting binary
executable.
$ chmod +x Xilinx_SDK_<version>_Lin64.BIN
./Xilinx_SDK_<version>_Lin64.BIN
3. The installer accepts your login credentials and allows you to select specific tool components.
The client then automatically downloads only what you have selected and installs it on your
local machine.
4. In the Select Edition to Install window, select the Xilinx Software Command-Line Tool
(XSCT) option to install XSCT as a seperate command-line tool only. Alternatively, you can
also select the Xilinx Software Development Kit (XSDK) option to install XSCT as a part of
the Xilinx SDK, an Eclipse-based integrated development environment.
5. Unless you choose otherwise, XSCT is installed in the /opt/Xilinx directory.
6. To launch XSCT on Linux, select Applications → Other and then select Xilinx Software
Command Line Tool <version>. Where <version> is the version number of the XSCT.
7. You can also launch XSCT from the command line.
cd /opt/Xilinx/SDK/<version>/bin
./xsct
8. To view the available command-line options, issue the help command at the XSCT command
prompt.
****** Xilinx Software Commandline Tool (XSCT)
xsct% help
Available Help Categories
xsct%
XSCT Commands
The Xilinx® Software Command-Line tool allows you to create complete Xilinx SDK workspaces,
investigate the hardware and software, debug and run the project, all from the command line.
XSCT commands are broadly classified into the following categories. The commands in each
category are described subsequently.
• Target Connection Management
• Target Registers
• Program Execution
• Target Memory
• Target Download FPGA/BINARY
• Target Reset
• Target Breakpoints/Watchpoints
• Jtag UART
• Miscellaneous
• JTAG Access
• SDK Projects
• HSI Commands
TIP:
• Help for each of the commands can be viewed by running help <command> or <command> -help in
the XSCT console. All the available XSCT commands can be listed by running help commands.
• You can use Ctrl+C to terminate long running commands like fpga or elf download or for/while
loops.
• You can terminate XSCT by pressing Ctrl+C twice in succession.
• Windows style paths are supported when the path is enclosed within curly brackets {}.
connect
Connect to hw_server/TCF agent.
Syntax
connect [options]
Options
Option Description
-host <host name/ip> Name/IP address of the host machine
-port <port num> TCP port number
-url <url> URL description of hw_server/TCF agent
-list List open connections
-set <channel-id> Set active connection
-new Create a new connection, even one exist to the same url
-xvc-url <url> Open Xilinx Virtual Cable connection
Returns
The return value depends on the options used.
-port, -host, -url, -new: <channel-id> of the new connection or error if the
connection fails
-list: list of open channels or nothing when there are no open channels
-set: nothing
Example(s)
connect -host localhost -port 3121
disconnect
Disconnect from hw_server/TCF agent.
Syntax
disconnect
Returns
Nothing, if the connection is closed. Error string, if invalid channel-id is specified.
targets
List targets or switch between targets.
Syntax
targets [options]
Options
Option Description
-set Set current target to entry single entry in list. This is useful in comibination with -
filter option. An error will be generate if list is empty or contains more than one
entry.
-regexp Use regexp for filter matching
-nocase Use case insensitive filter matching
-filter Specify filter expression to control which targets are included in list based on its
<filter- properties. Filter expressions are similar to Tcl expr syntax. Target properties are
expression> references by name, while Tcl variables are accessed using the $ syntax, string
must be quoted. Operators ==, !=, <=, >=, <, >, && and || are supported as well
Option Description
as (). There operators behave like Tcl expr operators. String matching operator =~
and !~ match lhs string with rhs pattern using either regexp or string match.
-target- Returns a Tcl list of dict's containing target properties.
properties
-index Include targets based on jtag scan chain position. This is identical to specifying -
<index> filter {jtag_device_index==<index>}.
-timeout Poll until the targets specified by filter option are found on the scan chain, or until
<sec> timeout. This option is valid only with filter option. The timeout value is in
seconds. Default timeout is 3 seconds
Returns
The return value depends on the options used.
<none>: Targets list when no options are used.
Example(s)
targets
List targets with name starting with "ARM" and ending with "#1".
targets 2
Set current target to target with name starting with "ARM" and ending with "#1".
Set current target to target with name starting with "MicroBlaze" and which is on 1st Jtag
Device.
gdbremote connect
Connect to GDB remote server.
Syntax
gdbremote connect [options] server
Connect to a GDB remote server, for example qemu. A special client named tcfgdbclient is
used to connect to remote GDB server.
Options
Option Description
-architecture <name> Specify default architecture is remote server does not provide it.
Returns
Nothing, if the connection is successful. Error string, if the connection failed.
gdbremote disconnect
Disconnect from GDB remote server.
Syntax
gdbremote disconnect [target-id]
Returns
Nothing, if the connection is close. Error string, if there is no active connection.
Target Registers
The following is a list of registers commands:
• rrd
• rwr
rrd
Read register for active target.
Syntax
rrd [options] [reg]
Read registers or register definitions. For a processor core target, processor core register
can be read. For a target representing a group of processor cores, system registers or IOU
registers can be read.
Options
Option Description
-defs Read register definitions instead of values
-no- Does not show bit fields along with register values. By default, bit fields are shown,
bits when available
Returns
Register names and values, or register definitions if successful. Error string, if the registers
cannot be read or if an invalid register is specified.
Example(s)
rrd
rrd r0
rrd usr r8
rrd sys 5
rrd sys 6
rwr
Write to register
Syntax
rwr <reg> <value>
Write the <value> to active target register specified by <reg> For a processor core target,
processor core register can be written to. For a target representing a group of processor
cores, system registers or IOU registers can be written.
Returns
Nothing, if successful. Error string, if an invalid register is specified or the register cannot be
written.
Example(s)
rwr r8 0x0
Program Execution
The following is a list of running commands:
• state
• stop
• con
• stp
• nxt
• stpi
• nxti
• stpout
• dis
• print
• locals
• backtrace
• profile
• mbprofile
state
Display the current state of the target.
Syntax
state
stop
Stop active target.
Syntax
stop
Returns
Nothing, if the target is suspended. Error string, if the target is already stopped or cannot
be stopped.
An information message is printed on the console when the target is suspended.
con
Resume active target.
Syntax
con [options]
Options
Option Description
-addr <address> Resume execution from address specified by <address>
-block Block until the target stops or a timeout is reached
-timeout <sec> Timeout value in seconds
Returns
Nothing, if the target is resumed. Error string, if the target is already running or cannot be
resumed or does not halt within timeout, after being resumed.
An information message is printed on the console when the target is resumed.
Example(s)
con -addr 0x100000
con -block
Resume execution of the active target and wait until the target stops.
Resume execution of the active target and wait until the target stops or until the 5 sec
timeout is reached.
stp
Step into a line of source code.
Syntax
stp [count]
Resume execution of the active target until control reaches instruction that belongs to
different line of source code. If a function is called, stop at first line of the function code.
Error is returned if line number information not available. If <count> is greater than 1,
repeat <count> times. Default value of count is 1.
Returns
Nothing, if the target has single stepped. Error string, if the target is already running or
cannot be resumed.
An information message is printed on the console when the target stops at the next
address.
nxt
Step over a line of source code.
Syntax
nxt [count]
Resume execution of the active target until control reaches instruction that belongs to a
different line of source code, but runs any functions called at full speed. Error is returned if
line number information not available. If <count> is greater than 1, repeat <count> times.
Default value of count is 1.
Returns
Nothing, if the target has stepped to the next source line. Error string, if the target is already
running or cannot be resumed.
An information message is printed on the console when the target stops at the next
address.
stpi
Execute a machine instruction.
Syntax
stpi [count]
Execute a single machine instruction. If instruction is function call, stop at first instruction of
the function code If <count> is greater than 1, repeat <count> times. Default value of count
is 1.
Returns
Nothing, if the target has single stepped. Error if the target is already running or cannot be
resumed.
An information message is printed on the console when the target stops at the next
address.
nxti
Step over a machine instruction.
Syntax
nxti [count]
Step over a single machine instruction. If instruction is function call, execution continues
until control returns from the function. If <count> is greater than 1, repeat <count> times.
Default value of count is 1.
Returns
Nothing, if the target has stepped to the next address. Error string, if the target is already
running or cannot be resumed.
An information message is printed on the console when the target stops at the next
address.
stpout
Step out from current function.
Syntax
stpout [count]
Resume execution of current target until control returns from current function. If <count> is
greater than 1, repeat <count> times. Default value of count is 1.
Returns
Nothing, if the target has stepped out of the current function. Error if the target is already
running or cannot be resumed.
An information message is printed on the console when the target stops at the next
address.
dis
Disassemble Instructions.
Syntax
dis <address> [num]
Disassemble <num> instructions at address specified by <address> The keyword "pc" can be
used to disassemble instructions at current PC Default value for <num> is 1.
Returns
Disassembled instructions if successful. Error string, if the target instructions cannot be read.
Example(s)
dis
dis pc 2
dis 0x0 2
print
Get or set the value of an expression.
Syntax
print [options] [expression]
Get or set the value of an expression specified by <expression>. The <expression> can
include constants, local/global variables, CPU registers, or any operator, but pre-processor
macros defined through #define are not supported. CPU registers can be specified in the
format {$r1}, where r1 is the register name. Elements of a complex data types like a
structure can be accessed through '.' operator. For example, var1.int_type refers to int_type
element in var1 struct. Array elements can be accessed through their indices. For example,
array1[0] refers to the element at index 0 in array1.
Options
Option Description
-add Add the <expression> to auto expression list. The values or definitions of the
<expression> expressions in auto expression list are displayed when expression name is not
specified. Frequently used expressions should be added to the auto expression
list.
-defs Return the expression definitions like address, type, size and RW flags. Not all
[expression] definitions are available for all the expressions. For example, address is available
only for variables and not when the expression includes an operator.
-dict Return the result in Tcl dict format, with variable names as dict keys and variable
[expression] values as dict values. For complex data like structures, names are in the form of
parent.child.
-remove Remove the expression from auto expression list. Only expressions previously
[expression] added to the list through -add option can be removed. When the expression
name is not specified, all the expressions in the auto expression list are removed.
-set Set the value of a variable. It is not possible to set the value of an expression
<expression> which includes constants or operators.
Returns
The return value depends on the options used.
Example(s)
print Int_Glob
print -a Microseconds
Add the variable Microseconds to auto expression list and return its value.
print -a Int_Glob*2 + 1
Add the expression (Int_Glob*2 + 1) to auto expression list and return its value.
print tmp_var.var1.int_type
Return the value of int_type element in var1 struct, where var1 is a member of tmp_var
struct.
print tmp_var.var1.array1[0]
Return the value of the element at index 0 in array array1. array1 is a member of var1 struct,
which is in turn a member of tmp_var struct.
print -defs
print {r1}
locals
Get or set the value of a local variable.
Syntax
locals [options] [variable-name [variable-value]]
Get or set the value of a variable specified by <variable-name>. When variable name and
value are not specified, values of all the local variables are returned. Elements of a complex
data types like a structure can be accessed through '.' operator. For example, var1.int_type
refers to int_type element in var1 struct. Array elements can be accessed through their
indices. For example, array1[0] refers to the element at index 0 in array1.
Options
Option Description
-defs Return the variable definitions like address, type, size and RW flags.
-dict Return the result in Tcl dict format, with variable names as dict keys and variable
[expression] values as dict values. For complex data like structures, names are in the form of
parent.child.
Returns
The return value depends on the options used.
<none>: Variable value(s)
Nothing, when variable value is set. Error string, if variable value cannot be read or set.
Example(s)
locals Int_Loc
locals
Return the values of all the local variables in the current stack frame.
locals -defs
Return definitions of all the local variables in the current stack frame.
locals Int_Loc 23
locals tmp_var.var1.int_type
Return the value of int_type element in var1 struct, where var1 is a member of tmp_var
struct.
locals tmp_var.var1.array1[0]
Return the value of the element at index 0 in array array1. array1 is a member of var1 struct,
which is in turn a member of tmp_var struct.
backtrace
Stack back trace.
Syntax
backtrace
Return stack trace for current target. Target must be stopped. Use debug information for
best result.
Returns
Stack Trace, if successful. Error string, if Stack Trace cannot be read from the target.
profile
Configure and run the GNU profiler.
Syntax
profile [options]
Configure and run the GNU profiler. The profiling needs to enabled while building bsp and
application to be profiled.
Options
Option Description
-freq Sampling frequency.
<sampling-
freq>
- Scratch memory for storing the profiling related data. It needs to be assigned
scratchaddr carefully, as it should not overlap with the program sections.
<addr>
-out <file- Name of the output file for writing the profiling data. This option also runs the
name> profiler and collects the data. If file name is not specified, profiling data is written
to gmon.out.
Returns
Depends on options used.
-scratchaddr, -freq: Returns nothing on successful configuration. Error string, in case of
error.
-out: Returns nothing, and generates a file. Error string, in case of error.
Example(s)
profile -freq 10000 -scratchaddr 0
Configure the profiler with a sampling frequency of 10000 and scratch memory at 0x0.
mbprofile
Configure and run the MB profiler.
Syntax
mbprofile [options]
Configure and run the MB profiler, a non-intrusive profiler for profiling the application
running on MB. The output file is generated in gmon.out format. The results can be viewed
using gprof editor. In case of cycle count, an annotated disassembly file is also generated
clearly marking time taken for execution of instructions.
Options
Option Description
-low Low address of the profiling address range.
<addr>
-high High address of the profiling address range.
<addr>
-freq Microblaze clock frequency. Default is 100MHz.
<value>
-count- Count no. of executed instructions. By default no. of clock cycles of executed
instr instructions are counted.
-cumulate Cumulative profiling. Profiling without clearing the profiling buffers.
-start Enable and start profiling.
-stop Disable/stop profiling.
-out Output profiling data to file. <filename> Name of the output file for writing the
<filename> profiling data. If file name is not specified, profiling data is written to gmon.out.
Returns
Depends on options used. -low, -high, -freq, -count-instr, -start, -cumulate Returns nothing
on successful configuration. Error string, in case of error.
-stop: Returns nothing, and generates a file. Error string, in case of error.
Example(s)
mbprofile -low 0x0 -high 0x3FFF
Configure the mb-profiler with address range 0x0 to 0x3FFF for profiling to count the clock
cycles of executed instructions.
mbprofile -start
mbprofile -count-instr
Configure the mb-profiler to profile for entire program address range to count no. of
instructions executed.
Target Memory
The following is a list of memory commands:
• mrd
• mwr
• osa
• memmap
mrd
Memory Read
Syntax
mrd [options] <address> [num]
Read <num> data values from the active target's memory address specified by <address>.
Options
Option Description
-force Overwrite access protection. By default accesses to reserved and invalid address
ranges are blocked.
-size <access-size> can be one of the values below: b = Bytes accesses h = Half-word
<access- accesses w = Word accesses d = Double-word accesses Default access size is w
size> Address will be aligned to access-size before reading memory, if '-unaligned-
access' option is not used. For targets which do not support double-word access,
debugger uses 2 word accesses. If number of data values to be read is more than 1,
then debugger selects appropriate access size. For example, 1. mrd -size b 0x0 4
Debugger accesses one word from the memory, displays 4 bytes. 2. mrd -size b 0x0
3 Debugger accesses one half-word and one byte from the memory, displays 3
bytes. 3. mrd 0x0 3 Debugger accesses 3 words from the memory and displays 3
words.
-value Return a Tcl list of values, instead of displaying the result on console.
-bin Return data read from the target in binary format.
-file Write binary data read from the target to <file-name>.
<file-
name>
-address- Access specified memory space instead default memory space of current target. For
space ARM DAP targets, address spaces DPR, APR and AP<n> can be used to access DP
<name> Registers, AP Registers and MEM-AP addresses, respectively. For backwards
compatibility -arm-dap and -arm-ap options can be used as shorthand for "-
address-space APR" and "-address-space AP<n>", respectively. The APR address
Option Description
range is 0x0 - 0xfffc, where the higher 8 bits select an AP and lower 8 bits are the
register address for that AP.
- Memory address is not aligned to access size, before performing a read operation.
unaligned- Support for unaligned accesses is target architecture dependent. If this option is
access not specified, addresses are automatically aligned to access size.
Note(s)
• Select a APU target to access ARM DAP and MEM-AP address space.
Returns
Memory addresses and data in requested format, if successful. Error string, if the target
memory cannot be read.
Example(s)
mrd 0x0
mrd 0x0 10
Read 100 words at address 0x0 and write the binary data to mem.bin.
Read APB-AP CSW on Zynq. The higher 8 bits (0x1) select the APB-AP and lower 8 bits (0x0)
is the address of CSW.
Read AHB-AP TAR on Zynq. The higher 8 bits (0x0) select the AHB-AP and lower 8 bits (0x4)
is the address of TAR.
mwr
Memory Write.
Syntax
mwr [options] <address> <values> [num]
Write <num> data values from list of <values> to active target memory address specified by
<address>. If <num> is not specified, all the <values> from the list are written sequentially
from the address specifed by <address> If <num> is greater than the size of the <values>
list, the last word in the list is filled at the remaining address locations.
mwr [options] -bin -file <file-name> <address> [num]
Read <num> data values from a binary file and write to active target memory address
specified by <address>. If <num> is not specified, all the data from the file is written
sequentially from the address specifed by <address>.
Options
Option Description
-force Overwrite access protection. By default accesses to reserved and invalid address
ranges are blocked.
-size <access-size> can be one of the values below: b = Bytes accesses h = Half-word
<access- accesses w = Word accesses d = Double-word accesses Default access size is w.
size> Address will be aligned to accesss-size before writing to memory, if '-unaligned-
access' option is not used. If target does not support double-word access, the
debugger uses 2 word accesses. If number of data values to be written is more than
1, then debugger selects appropriate access size. For example, 1. mwr -size b 0x0
{0x0 0x13 0x45 0x56} Debugger writes one word to the memory, combining 4 bytes.
2. mwr -size b 0x0 {0x0 0x13 0x45} Debugger writes one half-word and one byte to
Option Description
the memory, combining the 3 bytes. 3. mwr 0x0 {0x0 0x13 0x45} Debugger writes 3
words to the memory.
-bin Read binary data from a file and write it to target address space.
-file File from which binary data is read to write to target address space.
<file-
name>
-address- Access specified memory space instead default memory space of current target. For
space ARM DAP targets, address spaces DPR, APR and AP<n> can be used to access DP
<name> Registers, AP Registers and MEM-AP addresses, respectively. For backwards
compatibility -arm-dap and -arm-ap options can be used as shorthand for "-
address-space APR" and "-address-space AP<n>", respectively. The APR address
range is 0x0 - 0xfffc, where the higher 8 bits select an AP and lower 8 bits are the
register address for that AP.
- Memory address is not aligned to access size, before performing a write operation.
unaligned- Support for unaligned accesses is target architecture dependent. If this option is
accesses not specified, addresses are automatically aligned to access size.
Note(s)
• Select a APU target to access ARM DAP and MEM-AP address space.
Returns
Nothing, if successful. Error string, if the target memory cannot be written.
Example(s)
mwr 0x0 0x1234
Write 4 words from the list of values to address 0x0 and fill the last word from the list at
remaining 6 address locations.
Read 100 words from binary file mem.bin and write the data at target address 0x0.
Write 0x80000042 to APB-AP CSW on Zynq The higher 8 bits (0x1) select the APB-AP and
lower 8 bits (0x0) is the address of CSW.
Write 0xf8000120 to AHB-AP TAR on Zynq The higher 8 bits (0x0) select the AHB-AP and
lower 8 bits (0x4) is the address of TAR.
osa
Configure OS awareness for a symbol file.
Syntax
osa -file <file-name> [options]
Configure OS awareness for the symbol file <file-name> specified. If no symbol file is
specifed and only one symbol file exists in target's memory map, then that symbol file is
used. If no symbol file is specifed and multiple symbol files exist in target's memory map,
then an error is thrown.
Options
Option Description
- Disable OS awareness for a symbol file. If this option is not specified, OS awareness is
disable enabled.
-fast- Enable fast process start. New processes will not be tracked for debug and are not
exec visible in the debug targets view.
Option Description
-fast- Enable fast stepping. Only the current process will be re-synced after stepping. All
step other processes will not be re-synced when this flag is turned on.
Note(s)
• fast-exec and fast-step options are not valid with disable option.
Returns
Nothing, if OSA is configured successfully. Error, if ambiguous options are specified.
Example(s)
osa -file <symbol-file> -fast-step -fast-exec
Enable OSA for <symbole-file> and turn on fast-exec and fast-step modes.
memmap
Modify Memory Map.
Syntax
memmap <options>
Options
Option Description
-addr Address of the memory region that should be added/removed from the target's
<memory- memory map.
address>
-size Size of the memory region.
<memory-
size>
Option Description
-flags Protection flags for the memory region. <protection-flags> can be a bitwise
<protection- OR of the values below: 0x1 = Read access is allowed 0x2 = Write access is
flags> allowed 0x4 = Instruction fetch access is allowed Default value of <protection-
flags> is 0x3 (Read/Write Access).
-list List the memory regions added to the active target's memory map.
-clear Specify whether the memory region should be removed from the target's
memory map.
-relocate- Relocate the address map of the program sections to <addr>. This option should
section-map be used when the code is self-relocating, so that the debugger can find the
<addr> debug symbol info for the code. <addr> is the relative address, to which all the
program sections are relocated.
-osa Enable OS awareness for the symbol file. Fast process start and fast stepping
options are turned off by default. These options can be enabled using the osa
command. See "help osa" for more details.
-properties Specify advanced memory map properties.
<dict>
-meta-data Specify meta-data of advanced memory map properties.
<dict>
Note(s)
• Only the memory regions previously added through memmap command can be
removed.
Returns
Nothing, while setting the memory map, or list of memory maps when -list option is used.
Example(s)
memmap -addr 0xfc000000 -size 0x1000 -flags 3
Add the memory region 0xfc000000 - 0xfc000fff to target's memory map Read/Write
accesses are allowed to this region.
Remove the previously added memory region at 0xfc000000 from target's memory map.
dow
Download ELF and binary file to target.
Syntax
dow [options] <file>
Options
Option Description
-clear Clear uninitialized data (bss).
-keepsym Keep previously downloaded elfs in the list of symbol files. Default behavior is to
clear the old symbol files while downloading an elf.
-force Overwrite access protection. By default accesses to reserved and invalid address
ranges are blocked.
- Relocate the address map of the program sections to <addr>. This option should be
relocate- used when the code is self-relocating, so that the debugger can find debug symbol
section- info for the code. <addr> is the relative address, to which all the program sections
map are relocated.
<addr>
Returns
Nothing.
verify
Verify if ELF/binary file is downloaded correctly to target.
Syntax
verify [options] <file>
Verify if the binary file <file> is downloaded correctly to active target address specified by
<addr>.
Options
Option Description
-force Overwrite access protection. By default accesses to reserved and invalid address ranges
are blocked.
Returns
Nothing, if successful. Error string, if the memory address cannot be accessed or if there is a
mismatch.
fpga
Configure FPGA.
Syntax
fpga <bitstream-file>
Options
Option Description
-file Specify file containing bitstream.
<bitstream-
file>
-partial Configure FPGA without first clearing current configuration. This options
should be used while configuring partial bitstreams created before 2014.3 or
any partial bitstreams in binary format.
-no-revision- Disable bitstream vs silicon revision revision compatibility check.
check
-skip- Disable bitstream vs FPGA device compatibility check.
compatibility-
check
-state Return whether the FPGA is configured.
-config-status Return configuration status.
-ir-status Return IR capture status.
-boot-status Return boot history status.
-timer-status Return watchdog timer status.
-cor0-status Return configuration option 0 status.
-cor1-status Return configuration option 1 status.
-wbstar-status Return warm boot start address status.
Note(s)
• If no target is selected or if the current target is not a supported FPGA device, and only
one supported FPGA device is found in the targets list, then this device will be
configured.
Returns
Depends on options used.
-file, -partial: Nothing, if fpga is configured, or an error if the configuration failed.
Target Reset
The following is a list of reset commands:
• rst
rst
Target Reset.
Syntax
rst [options]
Options
Option Description
- Reset the active processor target.
processor
-cores Reset the active processor group. This reset type is supported only on Zynq. A
processor group is defined as a set of processors and on-chip peripherals like OCM.
-system Reset the active System.
-srst Generate system reset for active target. With JTAG this is done by generating a pulse
on the SRST pin on the JTAG cable assocated with the active target.
Returns
Nothing, if reset if successful. Error string, if reset is unsupported.
Target Breakpoints/Watchpoints
The following is a list of breakpoints commands:
• bpadd
• bpremove
• bpenable
• bpdisable
• bplist
• bpstatus
bpadd
Set a Breakpoint/Watchpoint.
Syntax
bpadd <options>
Options
Option Description
-addr Specify the address at which the Breakpoint should be set.
<breakpoint-
address>
-file <file- Specify the <file-name> in which the Breakpoint should be set.
name>
-line <line- Specify the <line-number> within the file, where Breakpoint should be set.
number>
-type Specify the Breakpoint type <breakpoint-type> can be one of the values below:
<breakpoint- auto = Auto - Breakpoint type is chosen by hw_server/TCF agent. This is the
type> default type hw = Hardware Breakpoint sw = Software Breakpoint
-mode Specify the access mode that will trigger the breakpoint. <breakpoint-mode>
<breakpoint- can be a bitwise OR of the values below: 0x1 = Triggered by a read from the
mode> breakpoint location 0x2 = Triggered by a write to the breakpoint location 0x4 =
Triggered by an instruction execution at the breakpoint location This is the
default for Line and Address breakpoints 0x8 = Triggered by a data change (not
an explicit write) at the breakpoint location
Option Description
-enable Specify initial enablement state of breakpoint. When <mode> is 0 the breakpoint
<mode> is disabled, otherwise the breakpoint is enabled. The default is enabled.
-ct-input Specify input and output cross triggers. <list> is a list of numbers identifying
<list> -ct- the cross trigger pin. For Zynq 0-7 is CTI for core 0, 8-15 is CTI for core 1, 16-23 is
output CTI ETB and TPIU, and 24-31 is CTI for FTM.
<list>
-properties Specify advanced breakpoint properties.
<dict>
-meta-data Specify meta-data of advanced breakpoint properties.
<dict>
-target-id Specify a target id for which the breakpoint should be set. A breakpoint can be
<id> set for all the targets by specifying the <id> as "all". If this option is not used,
then the breakpoint is set for the active target selected through targets
command. If there is no active target, then the breakpoint is set for all targets.
Note(s)
• Breakpoints can be set in XSDB before connecting to hw_server/TCF agent. If there is an
active target when a Breakpoint is set, the Breakpoint will be enabled only for that
active target. If there is no active target, the Breakpoint will be enabled for all the
targets. target-id option can be used to set a breakpoint for a specific target, or all
targets. An address breakpoint or a file:line breakpoint can also be set without the
options -addr, -file or -line. For address breakpoints, specify the address as an
argument, after all other options. For file:line breakpoints, specify the file name and line
number in the format <file>:<line>, as an argument, after all other options.
Returns
Breakpoint id or an error if invalid target id is specified.
Example(s)
bpadd -addr 0x100000
bpremove
Remove Breakpoints/Watchpoints.
Syntax
bpremove <id-list> | -all
Options
Option Description
-all Remove all breakpoints.
Returns
Nothing, if the breakpoint is removed successfully. Error string, if the breakpoint specified
by <id> is not set.
Example(s)
bpremove 0
Remove Breakpoint 0.
bpremove 1 2
bpremove -all
bpenable
Enable Breakpoints/Watchpoints.
Syntax
bpenable <id-list> | -all
Options
Option Description
-all Enable all breakpoints.
Returns
Nothing, if the breakpoint is enabled successfully. Error string, if the breakpoint specified by
<id> is not set.
Example(s)
bpenable 0
Enable Breakpoint 0.
bpenable 1 2
bpenable -all
bpdisable
Disable Breakpoints/Watchpoints.
Syntax
bpdisable <id-list> | -all
Options
Option Description
-all Disable all breakpoints.
Returns
Nothing, if the breakpoint is disabled successfully. Error string, if the breakpoint specified by
<id> is not set.
Example(s)
bpdisable 0
Disable Breakpoint 0.
bpdisable 1 2
bpdisable -all
bplist
List Breakpoints/Watchpoints.
Syntax
bplist
List all the Beakpoints/Watchpoints along with brief status for each Breakpoint and the
target on which it is set.
Returns
List of breakpoints.
bpstatus
Print Breakpoint/Watchpoint status.
Syntax
bpstatus <id>
Print the status of a Breakpoint/Watchpoint specified by <id>. Status includes the target
information for which the Breakpoint is active and also Breakpoint hitcount or error
message.
Options
None
Returns
Breakpoint status, if the breakpoint exists. Error string, if the breakpoint specified by <id> is
not set.
Jtag UART
The following is a list of streams commands:
• jtagterminal
• readjtaguart
jtagterminal
Start/Stop Jtag based hyper-terminal.
Syntax
jtagterminal [options]
Start/Stop a Jtag based hyper-terminal to communicate with ARM DCC or MDM UART
interface.
Options
Option Description
-start Start the Jtag Uart terminal. This is the default option.
-stop Stop the Jtag Uart terminal.
- Return the socket port number, instead of starting the terminal. External terminal
socket programs can be used to connect to this port.
Note(s)
• Select a MDM or ARM processor target before runnning this command.
Returns
Socket port number.
readjtaguart
Start/Stop reading from Jtag Uart.
Syntax
readjtaguart [options]
Start/Stop reading from the ARM DCC or MDM Uart Tx interface. Jtag Uart output can be
printed on stdout or redirected to a file.
Options
Option Description
-start Start reading the Jtag Uart output.
-stop Stop reading the Jtag Uart output.
-handle <file- Specify the file handle to which the data should be redirected. If no file handle
handle> is given, data is printed on stdout.
Note(s)
• Select a MDM or ARM processor target before runnning this command.
• While running a script in non-interactive mode, output from Jtag uart may not be
written to the log, until "readjtaguart -stop" is used.
Returns
Nothing, if successful. Error string, if data cannot be read from the Jtag Uart.
Example(s)
readjtaguart
Start reading from the Jtag Uart and print the output on stdout. set fp [open test.log w];
readjtaguart -start -handle $fp Start reading from the Jtag Uart and print the output to
test.log.
readjtaguart -stop
Miscellaneous
The following is a list of miscellaneous commands:
• loadhw
• unloadhw
• mdm_drwr
• mb_drwr
• mdm_drrd
• mb_drrd
• configparams
• version
• xsdbserver start
• xsdbserver stop
• xsdbserver disconnect
• xsdbserver version
loadhw
Load a Vivado HW design.
Syntax
loadhw [options]
Load a Vivado HW design, and set the memory map for the current target. If the current
target is a parent for a group of processors, memory map is set for all its child processors. If
current target is a processor, memory map is set for all the child processors of it's parent.
This command returns the HW design object.
Options
Option Description
-hw HW design file.
-list Return a list of open designs for the targets.
-mem-ranges List of memory ranges from which the memory map should be set. Memory
[list {start1 map is not set for the addresses outside these ranges. If this option is not
end1} {start2 specified, then memory map is set for all the addresses in the hardware
end2}] design.
Returns
Design object, if the HW design is loaded and memory map is set successfully. Error string,
if the HW design cannot be opened.
Example(s)
targets -filter {name =~ "APU"}; loadhw design.hdf Load the HW design named design.hdf
and set memory map for all the child processors of APU target. targets -filter {name =~
"xc7z045"}; loadhw design.hdf Load the HW design named design.hdf and set memory map
for all the child processors for which xc7z045 is the parent.
unloadhw
Unload a Vivado HW design.
Syntax
unloadhw
Close the Vivado HW design which was opened during loadhw command, and clear the
memory map for the current target. If the current target is a parent for a group of
processors, memory map is cleared for all its child processors. If the current target is a
processor, memory map is cleared for all the child processors of it's parent. This command
does not clear memory map explicitly set by users.
Returns
Nothing.
mdm_drwr
Write to MDM Debug Register.
Syntax
mdm_drwr [options] <cmd> <data> <bitlen>
Write to MDM Debug Register. cmd is 8-bit MDM command to access a Debug Register.
data is the register value and bitlen is the register width.
Options
Option Description
-user <bscan number> Specify user bscan port number. Default is 2.
Returns
Nothing, if successful. Error string, if BSCAN port is invalid.
Example(s)
mdm_drwr 8 0x40 8
mb_drwr
Write to MicroBlaze Debug Register.
Syntax
mb_drwr [options] <cmd> <data> <bitlen>
Write to MicroBlaze Debug Register available on MDM. cmd is 8-bit MDM command to
access a Debug Register. data is the register value and bitlen is the register width.
Options
Option Description
-user <bscan number> Specify user bscan port number. Default is 2.
Returns
Nothing, if successful. Error string, if BSCAN port is invalid.
Example(s)
mb_drwr 1 0x282 10
mdm_drrd
Read from MDM Debug Register.
Syntax
mdm_drrd [options] <cmd> <bitlen>
Read a MDM Debug Register. cmd is 8-bit MDM command to access a Debug Register and
bitlen is the register width. Returns hex register value.
Options
Option Description
-user <bscan number> Specify user bscan port number. Default is 2.
Returns
Register value, if successful. Error string, if BSCAN port is invalid.
Example(s)
mdm_drrd 0 32
mb_drrd
Read from MicroBlaze Debug Register.
Syntax
mb_drrd [options] <cmd> <bitlen>
Read a MicroBlaze Debug Register available on MDM. cmd is 8-bit MDM command to
access a Debug Register. bitlen is the register width. Returns hex register value.
Options
Option Description
-user <bscan number> Specify user bscan port number. Default is 2.
Returns
Register value, if successful. Error string, if BSCAN port is invalid.
Example(s)
mb_drrd 3 28
configparams
List, get or set configuration parameters.
Syntax
configparams <options>
List name and description for available configuration parameters. Configuration parameters
can be global or connection specific, therefore the list of available configuration parameters
and their value may change depending on current connection.
configparams <options> <name>
Options
Option Description
-all Include values for all contexts in result.
-context Specify context of value to get or set. The default context is "" which represet the
[context] global default. Not all options support context specific values.
Returns
Depends on the arguments specified.
<none>: List of parameters and description of each parameter.
Example(s)
configparams force-mem-accesses 1
Change the SDK launch timeout to 100 seconds, used for running SDK batch mode
commands.
version
Get SDK or TCF server version.
Syntax
version [options]
Get SDK or TCF server version. When no option is specified, SDK build version is returned.
Options
Option Description
-server Get the TCF server build version, for the active connection.
Returns
SDK or TCF Server version, on success. Error string, if server verison is requested when there
is no connection.
xsdbserver start
Start XSDB command server.
Syntax
xsdbserver start [options]
Start XSDB command server listener. XSDB command server allows external processes to
connect to XSDB to evaluate commands. The XSDB server reads commands from the
connected socket one line at the time. After evaluation, a line is sent back starting with
'okay' or 'error' followed by the result or error as a backslash quoted string.
Options
Option Description
-host Limits the network interface on which to listen for incomming connections.
<addr>
-port Specifies port to listen on. If this option is not specified or if the port is zero then a
<port> dynamically allocated port number is used.
Returns
Server details are disaplayed on the console if server is started. successfully, or error string,
if a server has been already started.
Example(s)
xsdbserver start
Start XSDB server listener using port 2000 and only allow incomming connections on this
host.
xsdbserver stop
Stop XSDB command server.
Syntax
xsdbserver stop
Stop XSDB command server listener and disconnect connected client if any.
Returns
Nothing, if the server is closed successfully. Error string, if the server has not been started
already.
xsdbserver disconnect
Disconnect active XSDB server connection.
Syntax
xsdbserver disconnect
Returns
Nothing, if the connection is closed. Error string, if there is no active connection.
xsdbserver version
Return XSDB command server version
Syntax
xsdbserver version
Returns
Server version if there is an active connection. Error string, if there is no active connection.
JTAG Access
The following is a list of jtag commands:
• jtag targets
• jtag sequence
• jtag device_properties
• jtag lock
• jtag unlock
• jtag claim
• jtag disclaim
• jtag frequency
• jtag skew
• jtag servers
jtag targets
List JTAG targets or switch between JTAG targets.
Syntax
jtag targets
Options
Option Description
-set Set current target to entry single entry in list. This is useful in comibination with -
filter option. An error will be generate if list is empty or contains more than one
entry.
-regexp Use regexp for filter matching.
-nocase Use case insensitive filter matching.
Option Description
-filter Specify filter expression to control which targets are included in list based on its
<filter- properties. Filter expressions are similar to Tcl expr syntax. Target properties are
expression> references by name, while Tcl variables are accessed using the $ syntax, string
must be quoted. Operators ==, !=, <=, >=, <, >, && and || are supported as well
as (). There operators behave like Tcl expr operators. String matching operator =~
and !~ match lhs string with rhs pattern using either regexp or string match.
-target- Returns a Tcl list of dictionaries containing target properties.
properties
-open Open all targets in list. List can be shorted by specifying target-ids and using
filters.
-close Close all targets in list. List can be shorted by specifying target-ids and using
filters.
-timeout Poll until the targets specified by filter option are found on the scan chain, or until
<sec> timeout. This option is valid only with filter option. The timeout value is in
seconds. Default timeout is 3 seconds.
Returns
The return value depends on the options used.
<none>: Jtag targets list when no options are used.
Example(s)
jtag targets
jtag targets 2
jtag sequence
Create JTAG sequence object.
Syntax
jtag sequence
Create JTAG sequence object. The jtag sequence command creates a new sequence object.
After creation the sequence is empty. The following sequence object commands are
available:
sequence state new-state [count]
Move JTAG state machine to <new-state> and then generate <count> JTAG clocks. If
<clock> is given and <new-state> is not a looping state (RESET, IDLE, IRSHIFT, IRPAUSE,
DRSHIFT or DRPAUSE) then state machine will move towards RESET state.
sequence irshift [options] [bits [data]]
Shift data in DRSHIFT state. Data is either given as the last argument or if -tdi option is
given then data will be all zeros or all ones depending on the argument given to -tdi. The
<bits> and <data> arguments are not used for irshift when the -register option is
specified.
Option Description
-register <name> Select instruction register by name. This option is only supported for
irshift.
-tdi <value> TDI value to use for all clocks in SHIFT state.
-binary Format of <data> is binary, for example data from a file or from binary
format.
-integer Format of <data> is an integer. The least significant bit of data is shifted
first.
-bits Format of <data> is a binary text string. The first bit in the string is
shifted first.
-hex Format of <data> is a hexadecimal text string. The least significant bit of
the first byte in the string is shifted first.
-capture Cature TDO data during shift and return from sequence run command.
-state <new-state> State to enter after shift is complete. The default is RESET.
Generate delay between sequence commands. No JTAG clocks will be generated during the
delay. The delay is guaranteed to be at least <usec> microseconds, but can be longer for
cables that do not support delays without generating JTAG clocks.
sequence get_pin pin
Set or clear atomic sequences. This is useful to creating sequences that are guaranteed to
run with precise timing or fail. Atomic sequences should be as short as possible to minimize
the risk of failure.
sequence run [options]
Run JTAG operations in sequence for the currently selected jtag target. This command will
return the result from shift commands using -capture option and from get_pin commands.
Option Description
-binary Format return value(s) as binary. The first bit shifted out is the least
significant bit in the first byte returned.
-integer Format return values(s) as integer. The first bit shifted out is the least
significant bit of the integer.
-bits Format return value(s) as binary text string. The first bit shifted out is the
first character in the string.
-hex Format return value(s) as hexadecimal text string. The first bit shifted out
is the least significant bit of the first byte of the in the string.
-single Combine all return values as a single piece of data. Without this option
the return value is a list with one entry for every shift with -capture and
every get_pin.
sequence clear
Delete sequence.
Returns
Jtag sequence object.
Example(s)
set seqname [jtag sequence] $seqname state RESET $seqname drshift -capture -tdi 0 256
set result [$seqname run] $seqname delete.
jtag device_properties
Get/set device properties.
Syntax
jtag device_properties idcode
Returns
Jtag device properties for the given idcode, or nothing, if the idcode is unknown.
Example(s)
jtag device_properties 0x4ba00477
jtag lock
Lock JTAG scan chain.
Syntax
jtag lock [timeout]
Lock JTAG scan chain containing current JTAG target. DESCRIPTION Wait for scan chain lock
to be available and then lock it. If <timeout> is specified the wait time is limited to
<timeout> milliseconds. The JTAG lock prevents other clients from performing any JTAG
shifts or state changes on the scan chain. Other scan chains can be used in parallel. The jtag
run_sequence command will ensure that all commands in the sequence are performed in
order so the use of jtag lock is only needed when multiple jtag run_sequence commands
needs to be done without interruption.
Note(s)
• A client should avoid locking more than one scan chain since this can cause dead-lock.
Returns
Nothing.
jtag unlock
Unlock JTAG scan chain.
Syntax
jtag unlock
Returns
Nothing.
jtag claim
Claim JTAG device.
Syntax
jtag claim <mask>
Set claim mask for current JTAG device. DESCRIPTION This command will attept to set the
claim mask for the current JTAG device. If any set bits in <mask> are already set in the
claim mask then this command will return error "already claimed".
The claim mask allow clients to negotiate control over JTAG devices. This is different from
jtag lock in that 1) it is specific to a device in the scan chain, and 2) any clients can perform
JTAG operations while the claim is in effect.
Note(s)
• Currently claim is used to disable the hw_server debugger from controlling
microprocessors on ARM DAP devices and FPGA devices containing Microblaze
processors.
Returns
Nothing.
jtag disclaim
Disclaim JTAG device.
Syntax
jtag disclaim <mask>
Returns
Nothing.
jtag frequency
Get/set JTAG frequency.
Syntax
jtag frequency
Get list of supported JTAG clock frequencies for current scan chain.
jtag frequency frequency
Returns
Current Jtag frequency, if no arguments are specified, or if Jtag frequency is successfully set.
Supported Jtag frequencies, if -list option is used. Error string, if invalid frequency is
specified or frequency cannot be set.
jtag skew
Get/set JTAG skew.
Syntax
jtag skew
Note(s)
• Clock skew property is not supported by some Jtag cables.
Returns
Current Jtag clock skew, if no arguments are specified, or if Jtag skew is successfully set.
Error string, if invalid skew is specified or skew cannot be set.
jtag servers
List, open or close JTAG servers.
Syntax
jtag servers [options]
List, open, and close JTAG servers. JTAG servers are use to implement support for different
types of JTAG cables. An open JTAG server will enumberate or connect to available JTAG
ports.
Options
Option Description
-list List opened servers. This is the default if no other option is given.
-format List format of supported server strings.
-open <server> Specifies server to open.
-close <server> Specifies server to close.
Returns
Depends on the options specified
<none>, -list: List of open Jtag servers.
-close: Nothing if the server is closed, or an error string, if invalid server is specified.
Example(s)
jtag servers
SVF Operations
The following is a list of svf commands:
• svf config
• svf generate
• svf mwr
• svf dow
• svf stop
• svf con
• svf delay
svf config
Configure options for SVF file
Syntax
svf config [options]
Options
Option Description
-scan- List of idcode-irlength pairs. This can be obtained from xsdb command - jtag
chain targets
<list of
idcode-
irlength
pairs>
-device- This is used to select device in the jtag scan chain.
index
<index>
-cpu-index Specify the cpu-index to generate the SVF file. For A53#0 - A53#3 on ZynqMP, use
<processor cpu-index 0 -3 For R5#0 - R5#1 on ZynqMP, use cpu-index 4 -5 For A9#0 - A9#1
core> on Zynq, use cpu-index 0 -1 If multiple MicroBlaze processors are connected to
MDM, select the specific MicroBlaze index for execution.
-out Output SVF file.
<filename>
-delay Delay in ticks between AP writes.
<tcks>
-linkdap Generate SVF for linking DAP to the jtag chain for ZynqMP Silicon versions 2.0 and
above.
-bscan This is used to specify user bscan port to which MDM is connected.
<user
port>
-mb- This used to specify the chunk size in bytes for each transaction while
chunksize downloading. Supported only for Microblaze processors.
<size in
bytes>
Returns
Nothing
Example(s)
svf config -scan-chain {0x14738093 12 0x5ba00477 4} -device-index 1
-cpu-index 0 -out "test.svf"
This creates a SVF file with name test.svf for core A53#0
This creates a SVF file with name test.svf for MB connected to MDM on bscan USER1
svf generate
Generate recorded SVF file
Syntax
svf generate
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
svf generate
svf mwr
Record memory write to SVF file
Syntax
svf mwr <address> <value>
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
svf mwr 0xffff0000 0x14000000
svf dow
Record elf download to SVF file
Syntax
svf dow <elf file>
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
svf dow "fsbl.elf"
svf stop
Record stopping of core to SVF file
Syntax
svf stop
Options
None
Returns
Nothing
Example(s)
svf stop
svf con
Record resuming of core to SVF file
Syntax
svf con
Options
None
Returns
Nothing
Example(s)
svf con
svf delay
Record delay in tcks to SVF file
Syntax
svf delay <delay in tcks>
Options
None
Returns
Nothing
Example(s)
svf delay 1000
SDK Projects
The following is a list of sdk commands:
• openhw
• closehw
• openbsp
• closebsp
• updatemss
• getaddrmap
• getperipherals
• repo
• configbsp
• setlib
• removelib
• getlibs
• setdriver
• getdrivers
• setosversion
• getos
• regenbsp
• setws
• getws
• createhw
• updatehw
• changebsp
• createbsp
• createapp
• createlib
• projects
• importprojects
• importsources
• getprojects
• deleteprojects
• configapp
• toolchain
openhw
Open a hardware design.
Syntax
openhw <hw-proj | hdf/xml file>
Open a hardware design exported from Vivado. HDF/XML file or the hardware project
created using 'createhw' command can be passed as argument.
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
openhw ZC702_hw_platform
openhw /tmp/wrk/hw1/system.hdf
closehw
Close a hardware design.
Syntax
closehw <hw project | hdf/xml file>
Close a hardware design that was opened using 'openhw' command. HDF/XML file or the
hardware project created using 'createhw' command can be passed as argument.
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
closehw ZC702_hw_platform
closehw /tmp/wrk/hw1/system.hdf
openbsp
Open the BSP.
Syntax
openbsp <bsp-proj | mss-file>
Open the BSP from BSP project created using 'createbsp', or from the MSS file.
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
openbsp hello_bsp
openbsp /tmp/wrk/hello_bsp/system.mss
closebsp
Close the BSP.
Syntax
closebsp <bsp-proj | mss-file>
Close the BSP project specified by <bsp-project> or the BSP project corresponding to the
MSS file specified by <mss-project>.
Options
None
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
closebsp hello_bsp
closebsp /tmp/wrk/hello_bsp/system.mss
updatemss
Update the mss file with the changes done to the BSP.
Syntax
updatemss [OPTIONS]
Options
Option Description
-mss <mss file> MSS file to be updated.
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
updatemss -mss system.mss
getaddrmap
Get the address ranges of IP connected to processor.
Syntax
getaddrmap <hw proj | hw spec file> <processor-instance>
Return the address ranges of all the IP connected to the processor in a tabular format, along
with details like size and access flags of all IP.
Options
None
Returns
If successful, this command returns the output of IPs and ranges. Otherwise it returns an
error.
Example(s)
getaddrmap hw1 ps7_cortexa9_0
Return the address map of peripherals connected to ps7_cortexa9_0. hw1 is the hw project,
which is created using command 'createhw'.
getperipherals
Get a list of all peripherals in the HW design.
Syntax
getperipherals <hw proj | hdf/xml file> <processor-instance>
Return the list of all the peripherals in the hardware design, along with version and type. If
[processor-instance] is specified, return only a list of slave peripherals connected to that
processor.
Options
None
Returns
If successful, this command returns the list of peripherals. Otherwise it returns an error.
Example(s)
getperipherals system.hdf
repo
Get, set, or modify software repositories.
Syntax
repo [OPTIONS]
Get/set the software repositories path currently used. This command is used to scan the
repositories, to get the list of OS/libs/drivers/apps from repository.
Options
Option Description
-set Set the repository path and load all the software cores available. Multiple
<path- repository paths can be specified as Tcl list.
list>
-get Get the repository path(s).
-scan Scan the repositories. Used this option to scan the repositories, when some
changes are done.
-os Return a list of all the OS from the repositories.
-libs Return a list of all the libs from the repositories.
-drivers Return a list of all the drivers from the repositories.
-apps Return a list of all the applications from the repositories.
Returns
Depends on the OPTIONS specified.
-scan, -set <path-list>: Returns nothing.
Example(s)
repo -set <repo-path>
repo -os
repo -libs
configbsp
Configure settings for BSP projects.
Syntax
configbsp [OPTIONS] [<param-name> [<value>]]
If <param-name> and <value> are not specified, returns the details of all configurable
parameters of processor, os, or all libraries in BSP. If <param-name> is specified and
<value> value is not specified, return the value of the parameter. If <param-name> and
<value> are specified, set the value of parameter.
Options
Option Description
-bsp <bsp-proj | mss BSP project or mss file.
file>
-proc Return the configurable parameters of processor in BSP.
-os Return the configurable parameters of OS in BSP.
-lib <lib-name> Return the configurable parameters of library <lib-name> in
BSP.
-append Append the value to the parameter in BSP.
Returns
Depends on the arguments specified.
<none>: List of parameters and description of each parameter of processor, os, or libs
depending on the option specified.
<parameter>: Parameter value or error, if unsupported parameter is specified.
Example(s)
configbsp -bsp system.mss -os
setlib
Set library and version in BSP.
Syntax
setlib [OPTIONS]
Add a library to BSP. If version is not specified, latest library version available is added. If
library is already available in BSP, the library version is updated.
Options
Option Description
-bsp <bsp-proj | mss BSP project or mss file.
file>
-lib <lib-name> Library name to be added to BSP.
-ver <lib-ver> Library version to be added. Default latest version of library is
added.
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
setlib -bsp hello_bsp -lib xilffs -ver 2.0
removelib
Remove library from BSP.
Syntax
removelib [OPTIONS]
Options
Option Description
-bsp <bsp-proj | mss file> BSP project or mss file.
-lib <lib-name> Library name to be removed from BSP.
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
removelib -bsp hello_bsp -lib xilffs
getlibs
Get libraries from BSP.
Syntax
getlibs [OPTIONS]
Return a list of libraries and their versions from BSP in tabular format.
Options
Option Description
-bsp <bsp-proj | mss-file> BSP project or mss file.
Returns
If successful, this command returns the library details. Otherwise it returns an error.
Example(s)
getlibs -bsp hello_bsp
setdriver
Set driver for IP in the BSP.
Syntax
setdriver [OPTIONS]
Options
Option Description
-bsp <bsp-proj | mss-file> BSP project or mss file to which the driver needs to be added.
Option Description
-ip <ip-name> IP instance for which driver needs to be set.
-driver <driver-name> Driver name which needs to be added to the BSP.
-ver <driver-version> Version of the driver.
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
setdriver -bsp hello_bsp -ip ps7_uart -driver generic -ver 2.0
getdrivers
Get drivers from BSP.
Syntax
getdrivers [OPTIONS]
Options
Option Description
-bsp <bsp-proj | mss-file> BSP project or mss file.
Returns
If successful, this command returns list of drivers. Otherwise it returns an error.
Example(s)
getdrivers -bsp hello_bsp
setosversion
Set OS version in BSP.
Syntax
setosversion [OPTIONS]
Options
Option Description
-bsp <bsp-proj | mss-file> BSP project or mss file corresponding to the OS.
-ver <os-version> Version of the OS. Default latest version of OS is added.
Returns
If successful, this command returns nothing. Otherwise it returns an error.
Example(s)
setosversion -bsp hello_bsp -ver 5.4
getos
Get OS details from BSP.
Syntax
getos [OPTIONS]
Options
Option Description
-bsp <bsp-proj | mss-file> BSP project or mss file corresponding to the OS.
Returns
If successful, this command returns OS details, otherwise it returns an error.
Example(s)
getos -bsp hello_bsp
regenbsp
Regenerate BSP sources.
Syntax
regenbsp [OPTIONS]
Options
Option Description
-bsp <bsp-proj | mss-file> BSP project or mss file.
Returns
If successful, this command returns nothing, otherwise it returns an error.
Example(s)
regenbsp -bsp hello_bsp
Regenerate the BSP sources with the changes done in the BSP settings.
setws
Set SDK workspace
Syntax
setws [OPTIONS] [path]
Set SDK workspace to <path>, for creating projects. If <path> does not exist, then the
directory is created. If <path> is not specified, then current directory is used.
Options
Option Description
-switch <path> Close existing workspace and switch to new workspace.
Returns
Nothing if the workspace is set successfully. Error string, if the path specified is a file.
Example(s)
setws /tmp/wrk/wksp1
getws
Get SDK workspace
Syntax
getws
Returns
Current workspace.
createhw
Create a hardware project.
Syntax
createhw [OPTIONS]
Options
Option Description
-name <project-name> Project name that should be created.
-hwspec <HW specfiction file> Hardware specification file for creating a hardware project.
Returns
Nothing, if the hardware project is created successfully. Error string, if invalid options are
used or if the project cannot be created.
Example(s)
createhw -name hw1 -hwspec system.hdf
Create a hardware project with name hw1 from the hardware specification file system.hdf.
updatehw
Update a hardware project.
Syntax
updatehw [OPTIONS]
Update a hardware project with the changes in the new hardware specification file.
Options
Option Description
-hw <hw-project> Hardware project that should be updated.
-newhwspec <hw specfiction New hardware specification file for updating the hardware
file> project.
Returns
Nothing, if the HW project is updated successfully. Error string, if invalid options are used or
if the project cannot be updated.
Example(s)
updatehw -hw hw1 -newhwspec system.hdf
Update the hardware project hw1 with the changes in the new hardware specification file
system.hdf.
changebsp
Change the referenced BSP for an application.
Syntax
changebsp [OPTIONS]
Options
Option Description
-app <application-project> Application project whose BSP should be changed.
-newbsp <BSP Project> New BSP which the application should refer.
Returns
Nothing, if the Application Project refernece changed. Error string, if invalid options are
used or if the project cannot be updated.
Example(s)
changebsp -app app1
Lists the bsp projects which can be referenced by the given application project changebsp -
app app1 -newbsp test2_bsp. Change the referneced bsp for app1 to test2_bsp.
createbsp
Create a bsp project
Syntax
createbsp [OPTIONS]
Options
Option Description
-name Project name that should be created
<project-
name>
-proc Processor instance that should be used for creating bsp project.
<processor-
name>
-hwproject Hardware project for which the application or bsp project should be created.
<hw project
name>
-os <OS OS type for the application project. Default type is standalone
name>
-mss <MSS MSS File path for creating BSP. This option can be used for creating a BSP from
File path> user mss file. When mss file is specified, then processor and os options will be
ignored and processor/os details are extracted from mss file.
-arch Processor architecture, <arch-type> can be 32 or 64 bits. This option is used to
<arch-type> build the project with 32/64 bit toolchain. This is valid only for A53 processors,
defaults to 32-bit for other processors.
Returns
Nothing, if the BSP project is created successfully. Error string, if invalid options are used or
if the project cannot be created.
Example(s)
createbsp -name bsp1 -hwproject hw1 -proc ps7_cortexa9_0
Create a BSP project with name bsp1 from the hardware project hw1 for processor
'ps7_cortexa9_0'
Create a BSP project with name bsp1 from the hardware project hw1 for processor
'ps7_cortexa9_0' and standalone OS.
Create a BSP project with name bsp1 with all the details from system.mss
Create a BSP project with name bsp1 for psu_cortexa53_0 using a 32 bit tool chain.
createapp
Create an application project.
Syntax
createapp [OPTIONS]
Options
Option Description
-name Project name that should be created.
<project-
name>
-app Name of the template application. Default is "Hello World". Use 'repo -apps'
<template- command to get the list of all application templates.
application-
name>
-proc Processor instance that should be used for creating application project.
<processor-
name>
Option Description
-hwproject Hardware project for which the application or bsp project should be created.
<hw project
name>
-bsp <BSP BSP project for which the application project should be created. If this option is
project name> not specified, a default bsp is created
-os <OS name> OS type for the application project. Default type is standalone
-lang <programming-language>, can be 'c' or 'c++'.
<programming-
language>
-arch <arch- Processor architecture, <arch-type> can be 32 or 64 bits. This option is used to
type> build the project with 32/64 bit toolchain. This is valid only for A53 processors,
defaults to 32-bit for other processors.
Returns
Nothing, if the Application project is created successfully. Error string, if invalid options are
used or if the project cannot be created.
Example(s)
createapp -name hello1 -bsp bsp1 -hwproject hw1 -proc ps7_cortexa9_0
Create a default application "Hello World" project with name 'hello1' for processor
'ps7_cortexa9_0'.
Create a Zynq FSBL project with name 'fsbl1' and also creates a BSP 'fsbl1_bsp' for processor
'ps7_cortexa9_0' and default OS 'standalone'.
-proc microblaze_0 -lang c++ Create an empty C++ application project with name 'e1'.
-proc psu_cortexa53_0 -arch 32 Create a Hello World application project with name 'hello2'
for processor 'psu_cortexa53_0' with 32-bit tool chain.
createlib
Create a library project.
Syntax
createlib [OPTIONS]
Options
Option Description
-name Project name that should be created.
<project-
name>
-type <library-type> can be 'static' or 'shared' Default type is 'shared'.
<library-
type>
-proc Processor type that should be used for creating application project.
<processor- 'ps7_cortex9', 'microblaze', 'psu_cortexa53' or 'psu_cortexr5'.
type>
-os <OS name> OS type for the application project. 'linux' or 'standalone' Default type is linux.
-lang <programming-language> can be 'c' or 'c++'. Default is c.
<programming-
language>
-arch <arch- Processor architecture, <arch-type> can be 32 or 64 This option is used to
type> build the project with 32/64 bit toolchain. This is valid only for A53 processors,
defaults to 32-bit for other processors.
-flags Optional - compiler flags.
<compiler-
flags>
Returns
Nothing, if the library project is created successfully Error string, if invalid options are used
or if the project cannot be created.
Example(s)
createlib -name lib1 -type static -proc ps7_cortexa9
Create a static library project with name 'lib1' for processor 'ps7_cortexa9' and default os
'standalone' with default language 'C'.
createlib -name lib2 type shared -proc psu_cortexa53 -os linux -lang C++
Create a shared library project with name 'lib2' for processor 'psu_cortexa53' and Linux OS
with C++ language.
-os standalone -lang C -arch 32 -flags {-g3 -pg} Create a static library project with name 'st-
stnd-r5-c-flags' for processor 'psu_cortexr5' and standalone OS with C language with extra
compiler flags '-g3 -pg'.
projects
Build/Clean projects.
Syntax
projects [OPTIONS]
Options
Option Description
-build | -clean Build / Clean projects.
-type <project-type> <project-type> can be "all", "bsp" or "app" Default type is all.
-name <project-name> Name of the project that should be built.
Returns
Nothing, if the project is built successfully. Error string, if invalid options are used or if the
project cannot be built.
Example(s)
projects -build -type bsp -name hello_bsp
projects -build
projects -clean
importprojects
Import projects to workspace.
Syntax
importprojects <path>
Returns
Nothing, if the projects are imported successfully. Error string, if project path is not specified
or if the projects cannot be imported.
Example(s)
importprojects /tmp/wrk/wksp1/hello1
importsources
Import sources to an application project.
Syntax
importsources [OPTIONS]
Options
Option Description
-name Application Project to which the sources should be imported.
<project-
name>
-path Path from which the source files should be imported. All the files/directories from the
<source- <source-path> are imported to application project. All existing source files will be
path> overwritten in the application, and new ones will be copied. Linker script will not be
copied to the application directory.
-linker- Copies the linker script as well.
script
Returns
Nothing, if the project sources are imported successfully. Error string, if invalid options are
used or if the project sources cannot be imported.
Example(s)
importsources -name hello1 -path /tmp/wrk/wksp2/hello2
Import the 'hello2' project sources to 'hello1' application project without the linker script.
Import the 'hello2' project sources to 'hello1' application project along with the linker script.
getprojects
Get projects from the workspace.
Syntax
getprojects [OPTIONS]
Options
Option Description
-type <project-type> <project-type> can be "all", "hw", "bsp" or "app" Default type is all.
Returns
List of all the projects of type <project-type> in the workspace.
Example(s)
getprojects
Return the list of all the projects available in the current workspace.
getprojects -type hw
deleteprojects
Delete project(s) from the workspace.
Syntax
deleteprojects [OPTIONS]
Options
Option Description
-name Project name/list to be deleted List of projects should be separated by semi-
colon {proj1;proj2;proj3}.
-workspace- Delete project from workspace only and not from disk. Default operation is to
only delete projects from disk.
Returns
Nothing, if the projects are deleted successfully. Error string, if invalid options are used or if
the project cannot be deleted.
Example(s)
deleteprojects -name hello1
configapp
Configure settings for application projects.
Syntax
configapp
List name and description for available configuration parameters for the application
projects. Following configuration parameters can be configured for applications: assembler-
flags : Miscellaneous flags for assembler build-config : Get/set build configuration compiler-
misc : Compiler miscellaneous flags compiler-optimization : Optimization level define-
compiler-symbols : Define symbols. Ex. MYSYMBOL include-path : Include path for header
files libraries : Libraries to be added while linking library-search-path : Search path for the
libraries added linker-misc : Linker miscellaneous flags linker-script : Linker script for linking
undef-compiler-symbols : Undefine symbols. Ex. MYSYMBOL
configapp [OPTIONS] -app <app-name> <param-name>
Get the value of configuration parameter <param-name> for the application specified by
<app-name>.
Options
Option Description
-set Set the configuration parameter value to new <value>.
-add Append the new <value> to configuration parameter value.
- Remove <value> from the configuration parameter value.
remove
-info Displays more information like possible values and possible operations about the
configuration parameter. A parameter name must be specified when this option is used.
Returns
Depends on the arguments specified. <none> List of parameters and description of each
parameter.
<parameter name>: Parameter value or error, if unsupported parameter is specified.
Example(s)
configapp
Return the list of all the configurable options for the application.
Display more information about possible values/operation and default operation for
compiler-optimization.
HSI Commands
XSCT provides higher level abstraction commands for Hardware Software Interface (HSI)
commands and you normally do not have to run the HSI commands in XSCT. However, if there is
a need, you can run HSI commands by prefixing hsi to each HSI command. For example, hsi
open_hw_design.
NOTE: You can use only one set of the commands at a time on any design. Interleaving both sets of
commands will lead to internal errors. For example, a design opened with hsi open_hw_design cannot be
closed using closehw.
• XSCT keeps track of the open designs (both software and hardware). The table below lists
the HSI commands and their corresponding XCST commands.
• Any modifications done to the software design or the BSP, using HSI commands, are stored
in memory. Before using any other XSCT commands, you should run the updatemss XSCT
command, to ensure that these modifications are stored in the .mss file of the BSP.
For more details on the HSI commands and their usage, refer to the Generating Basic Software
Platforms Reference Guide (UG1138).
NOTE: At any given point of time, a workspace can either be used only from Xilinx SDK or XSCT.
The following is a list of use cases describing how you can use the tool to perform common
tasks:
• Running Tcl Scripts
• Creating an Application Project Using an Application Template
• Modifying BSP Settings
• Changing Compiler Options of an Application Project
• Working with Libraries
• Creating a Bootable Image and Program the Flash
• Switching Between XSCT and Xilinx SDK Developement Environment
• Performing Standalone Application Debug
• Running an Application in Non-Interactive Mode
• Debugging a Program Already Running on the Target
• Using JTAG UART
• Debugging Applications on Zynq UltraScale+ MPSoC
setws /tmp/wrk/workspace
createhw –name hw0 –hwspec /tmp/wrk/system.hdf
createapp –name test –app {Empty Application} –proc psu_cortexa53_0
–hwproject hw0 –os standalone
importsources -name test -path /tmp/wrk/testsources/test/
configapp –app test -add compiler-misc {-std=c99}
projects –build
NOTE: Creating an application project will create a BSP project by adding the necessary libraries.
FSBL_DEBUG_DETAILED symbol is added to FSBL for debug messages.
setws /tmp/wrk/workspace
createhw –name hw0 –hwspec /tmp/wrk/system.hdf
createapp –name fsbl1 –app {Zynq MP FSBL} –proc psu_cortexa53_0 –hwproject
hw0 –os standalone
configapp –app fsbl1 define-compiler-symbols FSBL_DEBUG_DETAILED
projects –build
NOTE: Assuming the board to be zc702. Hence -flash_type qspi_single is used as an option in
program_flash.
setws /tmp/wrk/workspace
createhw –name hw0 –hwspec /tmp/wrk/system.hdf
createapp -name fsbl -app {Zynq FSBL} -proc ps7_cortexa9_0 -hwproject hw0
-os standalone
createapp -name hello -app {Hello World} -proc ps7_cortexa9_0 -hwproject
hw0 -os standalone
projects –build
exec bootgen -arch zynq -image output.bif -w -o BOOT.bin
exec program_flash -f /tmp/wrk/BOOT.bin -flash_type qspi_single
-blank_check -verify -cable \
type xilinx_tcf url tcp:localhost:3121
Below is an example of debugging a program already running on the target. For demo purpose,
the program has been stopped at main(), before this example session.
# Connect to hw_server
# Select the target on which the program is running and specify the symbol
file using the
# memmap command
xsdb% targets 2
xsdb% memmap -file dhrystone/Debug/dhrystone.elf
# Once the symbol file is specified, the debugger maps the code on the
target to the symbol
# file. bt command can be used to see the back trace. Further debug is
possible, as shown in
# the first example
xsdb% bt
0 0x1005a4 main(): ../src/dhry_1.c, line 79
1 0x1022d8 _start()+88
2 unknown-pc
When Zynq® UltraScale+™ MPSoC boots up JTAG bootmode, all the A53 and R5 cores are held
in reset. Users must clear resets on each core, before debugging on these cores. 'rst' command
in XSCT can be used to clear the resets. 'rst -processor' clears reset on an individual processor
core. 'rst -cores' clears resets on all the processor cores in the group (APU or RPU), of which the
current target is a child. For example, when A53 #0 is the current target, rst -cores clears resets
on all the A53 cores in APU.
Below is an example XSCT session that demonstrates standalone application debug on A53 #0
core on Zynq UltraScale+ MPSoC.
NOTE: Similar steps can be used for debugging applications on R5 cores and also on A53 cores in 32 bit
mode. However, the A53 cores must be put in 32 bit mode, before debugging the applications. This should be
done after POR and before the A53 resets are cleared.
xsdb% targets
1 PS TAP
2 PMU
3 MicroBlaze PMU (Sleeping. No clock)
4 PL
5 PSU
6 RPU (Reset)
7 Cortex-R5 #0 (RPU Reset)
8 Cortex-R5 #1 (RPU Reset)
9 APU (L2 Cache Reset)
10 Cortex-A53 #0 (APU Reset)
11 Cortex-A53 #1 (APU Reset)
12 Cortex-A53 #2 (APU Reset)
13 Cortex-A53 #3 (APU Reset)
xsdb% targets 5
# Configure the FPGA. When the active target is not a FPGA device,
the first FPGA device is configured
xsdb% targets 10
xsdb% rst -processor
NOTE: Once the BSP settings are changed, it is necessary to update the mss & regenerate the BSP sources to
reflect the BSP changes in the source file before compiling.
setws /tmp/wrk/workspace
createhw –name hw0 –hwspec /tmp/wrk/system_mb.hdf
createapp –name hello –app {Hello World} –proc microblaze_0 –hwproject hw0
–os standalone
configbsp -bsp hello_bsp stdin mdm_0
configbsp –bsp hello_bsp stdout mdm_0
updatemss -mss hello_bsp/system.mss
regenbsp -bsp hello_bsp
projects –build
xsct% targets
1 APU
2 ARM Cortex-A9 MPCore #0 (Running)
xsct% rst
# Info messages are displayed when the status of a core changes
Info: ARM Cortex-A9 MPCore #0 (target 2) Stopped at 0xfffffe1c (Suspended)
Info: ARM Cortex-A9 MPCore #1 (target 3) Stopped at 0xfffffe18 (Suspended)
# Configure the FPGA. When the active target is not a FPGA device,
#the first FPGA device is configured
# Run loadhw command to make the debugger aware of the processor cores’
memory map
xsct% loadhw ZC702_HwPlatform/system.hdf
design_1_wrapper
While a program is running on A9 #0, users can download another elf onto A9 #1 and debug it,
using similar steps. Note that, it’s not necessary to re-connect to the hw_server, initialize the PS
or configure the FPGA in such cases. Users can just select A9 #1 target and download the elf
and continue with further debug.
NOTE: SVF files can only be recorded using XSCT. You can use any standard SVF player to play the SVF file.
To play a SVF file in Vivado® Hardware manager, connect to a target and use the following TCL
command to play the file on the selected target.
# Select the target whose name starts with ARM and ends with #0.
# On Zynq, this selects “ARM Cortex-A9 MPCore #0”
# Resume execution and block until the core stops (due to breakpoint)
# or a timeout of 5 sec is reached
In the non-interactive mode, you can run the script by specifying the script as a launch
argument. Arguments to the script can follow the script name. For example:
The script below provides a usage example of XSCT. This script creates and builds an application,
connects to a remote hw_server, initializes the Zynq® PS connected to remote host, downloads
and executes the application on the target. These commands can be either scripted or run
interactively.
NOTE: The workspace created in XSCT can be used from Xilinx SDK. However, at a time, only one instance of
the tool can use the workspace.
setws /tmp/wrk/workspace
createhw –name hw0 –hwspec /tmp/wrk/system.hdf
createbsp -name bsp0 -proc ps7_cortexa9_0 -hwproject hw0 -os standalone
createapp -name hello0 -app {Hello World} -proc ps7_cortexa9_0 -hwproject
hw0 -bsp bsp0 -os standalone
createapp -name fsbl0 -app {Zynq FSBL} -proc ps7_cortexa9_0 -hwproject hw0
-bsp bsp0 -os standalone
projects –build
connect
source ps7_init.tcl
targets -set -filter {name =~"APU"}
loadhw system.hdf
stop
ps7_init
targets -set -nocase -filter {name =~ "ARM*#0"}
rst –processor
dow <app>.elf
jtagterminal
con
jtagterminal -stop #after you are done
Below is an example XSCT session that demonstrates how to use the XSCT console as STDOUT
for JTAG UART.
connect
source ps7_init.tcl
targets -set -filter {name =~"APU"}
loadhw system.hdf
stop
ps7_init
targets -set -nocase -filter {name =~ "ARM*#0"}
rst –processor
dow <app>.elf
readjtaguart
con
readjtaguart -stop #after you are done
Below is an example XSCT session that demonstrates how to redirect the STDOUT from JTAG
UART to a file.
connect
source ps7_init.tcl
targets -set -filter {name =~"APU"}
loadhw system.hdf
stop
ps7_init
targets -set -nocase -filter {name =~ "ARM*#0"}
rst –processor
dow <app>.elf
set fp [open uart.log w]
readjtaguart -handle $fp
con
readjtaguart -stop #after you are done
setws /tmp/wrk/workspace
createhw –name hw0 –hwspec /tmp/wrk/system.hdf
createbsp -name bsp0 -proc ps7_cortexa9_0 -hwproject hw0 -os standalone
setlib -bsp bsp0 -lib xilffs
setlib -bsp bsp0 -lib xilrsa
updatemss -mss bsp0/system.mss
regenbsp -bsp bsp0
createapp -name fsbl0 -app {Zynq FSBL} -proc ps7_cortexa9_0 -bsp bsp0
-hwproject hw0 -os standalone
projects –build
Xilinx Resources
For support resources such as Answers, Documentation, Downloads, and Forums, see Xilinx
Support.
Solution Centers
See the Xilinx Solution Centers for support on devices, software tools, and intellectual property
at all stages of the design cycle. Topics include design assistance, advisories, and
troubleshooting tips