diff options
author | Marc Schink <dev@zapb.de> | 2021-08-01 14:12:23 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-08-14 13:37:19 +0100 |
commit | 1549bad5b3de2c64b106475cfc23cfbccba2b8a3 (patch) | |
tree | bc583e3aa952b8904c76373e7beab8671c8fc8fd /src/jtag | |
parent | cba3bb6f2a736414f86a0e26d3ac8b91551b1574 (diff) | |
download | riscv-openocd-1549bad5b3de2c64b106475cfc23cfbccba2b8a3.zip riscv-openocd-1549bad5b3de2c64b106475cfc23cfbccba2b8a3.tar.gz riscv-openocd-1549bad5b3de2c64b106475cfc23cfbccba2b8a3.tar.bz2 |
drivers/usb_blaster: Group adapter commands
Use a command group 'usb_blaster' with subcommands instead of individual
commands with 'usb_blaster_' prefix.
The old commands are still available for backward compatibility but
marked as deprecated.
Change-Id: I2ae3d96ba864c20d7db67c74677781a62bfc4eb5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: http://openocd.zylin.com/6407
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'src/jtag')
-rw-r--r-- | src/jtag/drivers/usb_blaster/usb_blaster.c | 23 | ||||
-rw-r--r-- | src/jtag/startup.tcl | 30 |
2 files changed, 47 insertions, 6 deletions
diff --git a/src/jtag/drivers/usb_blaster/usb_blaster.c b/src/jtag/drivers/usb_blaster/usb_blaster.c index 8519d19..cc1d475 100644 --- a/src/jtag/drivers/usb_blaster/usb_blaster.c +++ b/src/jtag/drivers/usb_blaster/usb_blaster.c @@ -1030,16 +1030,16 @@ COMMAND_HANDLER(ublast_firmware_command) } -static const struct command_registration ublast_command_handlers[] = { +static const struct command_registration ublast_subcommand_handlers[] = { { - .name = "usb_blaster_device_desc", + .name = "device_desc", .handler = ublast_handle_device_desc_command, .mode = COMMAND_CONFIG, .help = "set the USB device description of the USB-Blaster", .usage = "description-string", }, { - .name = "usb_blaster_vid_pid", + .name = "vid_pid", .handler = ublast_handle_vid_pid_command, .mode = COMMAND_CONFIG, .help = "the vendor ID and product ID of the USB-Blaster and " @@ -1048,21 +1048,21 @@ static const struct command_registration ublast_command_handlers[] = { .usage = "vid pid vid_uninit pid_uninit", }, { - .name = "usb_blaster_lowlevel_driver", + .name = "lowlevel_driver", .handler = ublast_handle_lowlevel_drv_command, .mode = COMMAND_CONFIG, .help = "set the lowlevel access for the USB Blaster (ftdi, ublast2)", .usage = "(ftdi|ublast2)", }, { - .name = "usb_blaster_pin", + .name = "pin", .handler = ublast_handle_pin_command, .mode = COMMAND_ANY, .help = "show or set pin state for the unused GPIO pins", .usage = "(pin6|pin8) (0|1|s|t)", }, { - .name = "usb_blaster_firmware", + .name = "firmware", .handler = &ublast_firmware_command, .mode = COMMAND_CONFIG, .help = "configure the USB-Blaster II firmware location", @@ -1071,6 +1071,17 @@ static const struct command_registration ublast_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration ublast_command_handlers[] = { + { + .name = "usb_blaster", + .mode = COMMAND_ANY, + .help = "perform usb_blaster management", + .chain = ublast_subcommand_handlers, + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static struct jtag_interface usb_blaster_interface = { .supported = DEBUG_CAP_TMS_SEQ, .execute_queue = ublast_execute_queue, diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index 80d21e7..5763310 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -645,4 +645,34 @@ proc buspirate_port args { eval buspirate port $args } +lappend _telnet_autocomplete_skip usb_blaster_device_desc +proc usb_blaster_device_desc args { + echo "DEPRECATED! use 'usb_blaster device_desc' not 'usb_blaster_device_desc'" + eval usb_blaster device_desc $args +} + +lappend _telnet_autocomplete_skip usb_blaster_vid_pid +proc usb_blaster_vid_pid args { + echo "DEPRECATED! use 'usb_blaster vid_pid' not 'usb_blaster_vid_pid'" + eval usb_blaster vid_pid $args +} + +lappend _telnet_autocomplete_skip usb_blaster_lowlevel_driver +proc usb_blaster_lowlevel_driver args { + echo "DEPRECATED! use 'usb_blaster lowlevel_driver' not 'usb_blaster_lowlevel_driver'" + eval usb_blaster lowlevel_driver $args +} + +lappend _telnet_autocomplete_skip usb_blaster_pin +proc usb_blaster_pin args { + echo "DEPRECATED! use 'usb_blaster pin' not 'usb_blaster_pin'" + eval usb_blaster pin $args +} + +lappend _telnet_autocomplete_skip usb_blaster_firmware +proc usb_blaster_firmware args { + echo "DEPRECATED! use 'usb_blaster firmware' not 'usb_blaster_firmware'" + eval usb_blaster firmware $args +} + # END MIGRATION AIDS |