21.11.8 get_connected_programmers
(Ask a Question)Description
This Tcl command returns a list of currently connected programmers which can be parsed and used to select, enable or disable programmers as needed.
Use this command to query the programmers connected to the host system before running programming operations.
get_connected_programmers
Arguments
| Parameter | Type | Description |
|---|---|---|
| None | None | This command does not have any parameters. |
| Return Type | Description |
|---|---|
| Tcl list | Returns a Tcl list of connected programmers. Each programmer is returned as a two-element list containing the programmer ID and programmer type. |
Error Codes
| Error Code | Description |
|---|---|
| None | None |
Supported Families
PolarFire® SoC
Example
The following command returns the list of connected programmers:
get_connected_programmers
Output:
{1380217 FP6} {S200XTYQWQ FP5}
Here, the first item in each sub-list is the programmer ID, and the second item is the programmer type.
The following example shows how to parse the returned list:
set programmers [get_connected_programmers]
puts $programmers
set programmer [lindex [lindex $programmers 0] 0]
puts $programmer
set type [lindex [lindex $programmers 0] 1]
puts $type
set name2 [lindex [lindex $programmers 1] 0]
puts $name2
set type2 [lindex [lindex $programmers 1] 1]
puts $type2
Output:
The 'get_connected_programmers' command succeeded.
{1380217 FP6} {S200XTYQWQ FP5}
1380217
FP6
S200XTYQWQ
FP5
See Also
None
