Target Connection Management
The following is a list of connections commands:
connect
Connect to hw_server/TCF agent.
Syntax
connect [options]
Allows users to connect to a server, list connections or switch between connections.
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 |
-symbols |
Launch symbol server to enable source level debugging for remote connections |
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
Connect to hw_server/TCF agent on host localhost and port 3121.
connect -url tcp:localhost:3121
Identical to previous example.
disconnect
Disconnect from hw_server/TCF agent.
Syntax
disconnect
Disconnect from active channel.
disconnect <channel-id>
Disconnect from specified channel.
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]
List available targets.
targets <target id>
Select <target id>
as active target.
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 <filter-expression> |
Specify filter expression to control which targets are included in list based on its properties. Filter expressions are similar to Tcl expr syntax. Target properties are 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-properties |
Returns a Tcl list of dict's containing target properties. |
-index <index> |
Include targets based on jtag scan chain position. This is identical to specifying -filter {jtag_device_index==<index> }. |
-timeout <sec> |
Poll until the targets specified by filter option are found on the scan chain, or until 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.
-filter
: Filtered targets list.
-target-properties
: Tcl list consisting of target properties.
An error is returned when target selection fails.
Example(s)
targets
List all targets.
targets -filter {name =~ "ARM*#1"}
List targets with name starting with "ARM" and ending with "#1".
targets 2
Set target with id 2 as the current target.
targets -set -filter {name =~ "ARM*#1"}
Set current target to target with name starting with "ARM" and ending with "#1".
targets -set -filter {name =~ "MicroBlaze*"} -index 0
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. xrt_server 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]
Disconnect from GDB remote server, for example qemu.
Returns
Nothing, if the connection is close. Error string, if there is no active connection.