jtag/hla: Restructure commands
Use a command group 'hla' with subcommands instead of individual commands with 'hla_' prefix. The old commands are still available to ensure backwards compatibility, but are marked as deprecated. Change-Id: I612e3cc080d308735932aea0f11001428eadc570 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8335 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
7957208cf6
commit
4d99e77419
|
@ -3197,19 +3197,19 @@ versions of firmware where serial number is reset after first use. Suggest
|
|||
using ST firmware update utility to upgrade ST-LINK firmware even if current
|
||||
version reported is V2.J21.S4.
|
||||
|
||||
@deffn {Config Command} {hla_device_desc} description
|
||||
@deffn {Config Command} {hla device_desc} description
|
||||
Currently Not Supported.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {hla_layout} (@option{stlink}|@option{icdi}|@option{nulink})
|
||||
@deffn {Config Command} {hla layout} (@option{stlink}|@option{icdi}|@option{nulink})
|
||||
Specifies the adapter layout to use.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {hla_vid_pid} [vid pid]+
|
||||
@deffn {Config Command} {hla vid_pid} [vid pid]+
|
||||
Pairs of vendor IDs and product IDs of the device.
|
||||
@end deffn
|
||||
|
||||
@deffn {Config Command} {hla_stlink_backend} (usb | tcp [port])
|
||||
@deffn {Config Command} {hla stlink_backend} (usb | tcp [port])
|
||||
@emph{ST-Link only:} Choose between 'exclusive' USB communication (the default backend) or
|
||||
'shared' mode using ST-Link TCP server (the default port is 7184).
|
||||
|
||||
|
@ -3218,7 +3218,7 @@ available from @url{https://www.st.com/en/development-tools/st-link-server.html,
|
|||
ST-LINK server software module}.
|
||||
@end deffn
|
||||
|
||||
@deffn {Command} {hla_command} command
|
||||
@deffn {Command} {hla command} command
|
||||
Execute a custom adapter-specific command. The @var{command} string is
|
||||
passed as is to the underlying adapter layout handler.
|
||||
@end deffn
|
||||
|
|
|
@ -319,37 +319,37 @@ COMMAND_HANDLER(interface_handle_hla_command)
|
|||
return ERROR_OK;
|
||||
}
|
||||
|
||||
static const struct command_registration hl_interface_command_handlers[] = {
|
||||
static const struct command_registration hl_interface_subcommand_handlers[] = {
|
||||
{
|
||||
.name = "hla_device_desc",
|
||||
.name = "device_desc",
|
||||
.handler = &hl_interface_handle_device_desc_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "set the device description of the adapter",
|
||||
.usage = "description_string",
|
||||
},
|
||||
{
|
||||
.name = "hla_layout",
|
||||
.name = "layout",
|
||||
.handler = &hl_interface_handle_layout_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "set the layout of the adapter",
|
||||
.usage = "layout_name",
|
||||
},
|
||||
{
|
||||
.name = "hla_vid_pid",
|
||||
.name = "vid_pid",
|
||||
.handler = &hl_interface_handle_vid_pid_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "the vendor and product ID of the adapter",
|
||||
.usage = "(vid pid)*",
|
||||
},
|
||||
{
|
||||
.name = "hla_stlink_backend",
|
||||
.name = "stlink_backend",
|
||||
.handler = &hl_interface_handle_stlink_backend_command,
|
||||
.mode = COMMAND_CONFIG,
|
||||
.help = "select which ST-Link backend to use",
|
||||
.usage = "usb | tcp [port]",
|
||||
},
|
||||
{
|
||||
.name = "hla_command",
|
||||
.name = "command",
|
||||
.handler = &interface_handle_hla_command,
|
||||
.mode = COMMAND_EXEC,
|
||||
.help = "execute a custom adapter-specific command",
|
||||
|
@ -358,6 +358,17 @@ static const struct command_registration hl_interface_command_handlers[] = {
|
|||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
static const struct command_registration hl_interface_command_handlers[] = {
|
||||
{
|
||||
.name = "hla",
|
||||
.mode = COMMAND_ANY,
|
||||
.help = "perform hla management",
|
||||
.chain = hl_interface_subcommand_handlers,
|
||||
.usage = "",
|
||||
},
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct adapter_driver hl_adapter_driver = {
|
||||
.name = "hla",
|
||||
.transports = hl_transports,
|
||||
|
|
|
@ -1126,6 +1126,36 @@ proc "cmsis_dap_usb" {args} {
|
|||
eval cmsis-dap usb $args
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip "hla_layout"
|
||||
proc "hla_layout" {layout} {
|
||||
echo "DEPRECATED! use 'hla layout', not 'hla_layout'"
|
||||
eval hla layout $layout
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip "hla_device_desc"
|
||||
proc "hla_device_desc" {desc} {
|
||||
echo "DEPRECATED! use 'hla device_desc', not 'hla_device_desc'"
|
||||
eval hla device_desc $desc
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip "hla_vid_pid"
|
||||
proc "hla_vid_pid" {args} {
|
||||
echo "DEPRECATED! use 'hla vid_pid', not 'hla_vid_pid'"
|
||||
eval hla vid_pid $args
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip "hla_command"
|
||||
proc "hla_command" {command} {
|
||||
echo "DEPRECATED! use 'hla command', not 'hla_command'"
|
||||
eval hla command $command
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip "hla_stlink_backend"
|
||||
proc "hla_stlink_backend" {args} {
|
||||
echo "DEPRECATED! use 'hla stlink_backend', not 'hla_stlink_backend'"
|
||||
eval hla stlink_backend $args
|
||||
}
|
||||
|
||||
lappend _telnet_autocomplete_skip "kitprog_init_acquire_psoc"
|
||||
proc "kitprog_init_acquire_psoc" {} {
|
||||
echo "DEPRECATED! use 'kitprog init_acquire_psoc', not 'kitprog_init_acquire_psoc'"
|
||||
|
|
Loading…
Reference in New Issue