adapter: list supported transports beside adapter name

Modify the command 'adapter list' to output the list of transports
supported by each adapter driver.
Drop the line number, as there is no real interest on it.
Format the output as a TCL dictionary indexed by the adapter name
and containing the transports in a TCL list. E.g:
	dummy          { jtag }
	ftdi           { jtag swd }

This format is easily handled by TCL scripts, e.g.:
	dict get [adapter list] ftdi

Document the command output.

Change-Id: I69f73b71da2f1756866a63bc2c0ba33459a29063
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8691
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2025-01-04 18:41:41 +01:00
parent c3fae34969
commit da50873d5e
2 changed files with 24 additions and 1 deletions

View File

@@ -2414,6 +2414,17 @@ target.
@deffn {Command} {adapter list}
List the debug adapter drivers that have been built into
the running copy of OpenOCD.
The output is formatted as a Tcl dictionary indexed by the adapter name
and containing the transports in a Tcl list.
@example
dummy @{ jtag @}
ftdi @{ jtag swd @}
@end example
This format is easily handled by Tcl scripts:
@example
dict get [adapter list] ftdi
@end example
@end deffn
@anchor{adapter gpio}