drivers/jtag_dpi: Group adapter commands

Use a command group 'jtag_dpi' with subcommands instead of individual
commands with 'jtag_dpi_' prefix.

The old commands are still available for backward compatibility but
marked as deprecated.

Change-Id: I19271546235a3c6737f975976a0bf0a2f66cbbe7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6394
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
Marc Schink 2021-07-30 18:24:03 +02:00 committed by Antonio Borneo
parent 347af768ed
commit 08ce499f14
3 changed files with 28 additions and 5 deletions

View File

@ -3321,11 +3321,11 @@ SystemVerilog Direct Programming Interface (DPI) compatible driver for
JTAG devices in emulation. The driver acts as a client for the SystemVerilog
DPI server interface.
@deffn {Config Command} {jtag_dpi_set_port} port
@deffn {Config Command} {jtag_dpi set_port} port
Specifies the TCP/IP port number of the SystemVerilog DPI server interface.
@end deffn
@deffn {Config Command} {jtag_dpi_set_address} address
@deffn {Config Command} {jtag_dpi set_address} address
Specifies the TCP/IP address of the SystemVerilog DPI server interface.
@end deffn
@end deffn

View File

@ -373,16 +373,16 @@ COMMAND_HANDLER(jtag_dpi_set_address)
return ERROR_OK;
}
static const struct command_registration jtag_dpi_command_handlers[] = {
static const struct command_registration jtag_dpi_subcommand_handlers[] = {
{
.name = "jtag_dpi_set_port",
.name = "set_port",
.handler = &jtag_dpi_set_port,
.mode = COMMAND_CONFIG,
.help = "set the port of the DPI server",
.usage = "[port]",
},
{
.name = "jtag_dpi_set_address",
.name = "set_address",
.handler = &jtag_dpi_set_address,
.mode = COMMAND_CONFIG,
.help = "set the address of the DPI server",
@ -391,6 +391,17 @@ static const struct command_registration jtag_dpi_command_handlers[] = {
COMMAND_REGISTRATION_DONE
};
static const struct command_registration jtag_dpi_command_handlers[] = {
{
.name = "jtag_dpi",
.mode = COMMAND_ANY,
.help = "perform jtag_dpi management",
.chain = jtag_dpi_subcommand_handlers,
.usage = "",
},
COMMAND_REGISTRATION_DONE
};
static struct jtag_interface jtag_dpi_interface = {
.supported = DEBUG_CAP_TMS_SEQ,
.execute_queue = jtag_dpi_execute_queue,

View File

@ -309,6 +309,18 @@ proc parport_toggling_time args {
eval parport toggling_time $args
}
lappend _telnet_autocomplete_skip jtag_dpi_set_port
proc jtag_dpi_set_port args {
echo "DEPRECATED! use 'jtag_dpi set_port' not 'jtag_dpi_set_port'"
eval jtag_dpi set_port $args
}
lappend _telnet_autocomplete_skip jtag_dpi_set_address
proc jtag_dpi_set_address args {
echo "DEPRECATED! use 'jtag_dpi set_address' not 'jtag_dpi_set_address'"
eval jtag_dpi set_address $args
}
lappend _telnet_autocomplete_skip presto_serial
proc presto_serial args {
echo "DEPRECATED! use 'presto serial' not 'presto_serial'"