From: OpenOCD-Gerrit <ope...@us...> - 2021-08-14 12:36:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b421d2a4c52b3fe4d939c6f41327b6a5370e09c0 (commit) via e57ffd84b89a9f33b55d887212fc88e9f2c6ab39 (commit) via 2fdf6788e20d53f8368f508de5ff39627d8ce27a (commit) from 30bb4524de2b430d9c9ff005608fb5a2886fcd60 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b421d2a4c52b3fe4d939c6f41327b6a5370e09c0 Author: Marc Schink <de...@za...> Date: Fri Jul 30 18:39:27 2021 +0200 drivers/jtag_vpi: Group adapter commands Use a command group 'jtag_vpi' with subcommands instead of individual commands with 'jtag_vpi_' prefix. The old commands are still available for backward compatibility but marked as deprecated. Change-Id: Ie1fcc2cc138796d27f1e862692bb9ef8b11bc10d Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6398 Tested-by: jenkins Reviewed-by: Jan Matyas <ma...@co...> Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/drivers/jtag_vpi.c b/src/jtag/drivers/jtag_vpi.c index a5b51aeb8..a0138f840 100644 --- a/src/jtag/drivers/jtag_vpi.c +++ b/src/jtag/drivers/jtag_vpi.c @@ -640,23 +640,23 @@ COMMAND_HANDLER(jtag_vpi_stop_sim_on_exit_handler) return ERROR_OK; } -static const struct command_registration jtag_vpi_command_handlers[] = { +static const struct command_registration jtag_vpi_subcommand_handlers[] = { { - .name = "jtag_vpi_set_port", + .name = "set_port", .handler = &jtag_vpi_set_port, .mode = COMMAND_CONFIG, .help = "set the port of the VPI server", .usage = "tcp_port_num", }, { - .name = "jtag_vpi_set_address", + .name = "set_address", .handler = &jtag_vpi_set_address, .mode = COMMAND_CONFIG, .help = "set the address of the VPI server", .usage = "ipv4_addr", }, { - .name = "jtag_vpi_stop_sim_on_exit", + .name = "stop_sim_on_exit", .handler = &jtag_vpi_stop_sim_on_exit_handler, .mode = COMMAND_CONFIG, .help = "Configure if simulation stop command shall be sent " @@ -666,6 +666,17 @@ static const struct command_registration jtag_vpi_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration jtag_vpi_command_handlers[] = { + { + .name = "jtag_vpi", + .mode = COMMAND_ANY, + .help = "perform jtag_vpi management", + .chain = jtag_vpi_subcommand_handlers, + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static struct jtag_interface jtag_vpi_interface = { .supported = DEBUG_CAP_TMS_SEQ, .execute_queue = jtag_vpi_execute_queue, diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index 4217d2335..688d1fccf 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -321,6 +321,24 @@ proc jtag_dpi_set_address args { eval jtag_dpi set_address $args } +lappend _telnet_autocomplete_skip jtag_vpi_set_port +proc jtag_vpi_set_port args { + echo "DEPRECATED! use 'jtag_vpi set_port' not 'jtag_vpi_set_port'" + eval jtag_vpi set_port $args +} + +lappend _telnet_autocomplete_skip jtag_vpi_set_address +proc jtag_vpi_set_address args { + echo "DEPRECATED! use 'jtag_vpi set_address' not 'jtag_vpi_set_address'" + eval jtag_vpi set_address $args +} + +lappend _telnet_autocomplete_skip jtag_vpi_stop_sim_on_exit +proc jtag_vpi_stop_sim_on_exit args { + echo "DEPRECATED! use 'jtag_vpi stop_sim_on_exit' not 'jtag_vpi_stop_sim_on_exit'" + eval jtag_vpi stop_sim_on_exit $args +} + lappend _telnet_autocomplete_skip presto_serial proc presto_serial args { echo "DEPRECATED! use 'presto serial' not 'presto_serial'" commit e57ffd84b89a9f33b55d887212fc88e9f2c6ab39 Author: Marc Schink <de...@za...> Date: Fri Jul 30 18:31:07 2021 +0200 tcl/interface: Adapt config files to new bcm2835gpio command syntax Change-Id: I2d649117aa8dbdf5484ace068785a1416efa3ecc Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6397 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/interface/raspberrypi-native.cfg b/tcl/interface/raspberrypi-native.cfg index 2d0547f31..634b8c95a 100644 --- a/tcl/interface/raspberrypi-native.cfg +++ b/tcl/interface/raspberrypi-native.cfg @@ -10,28 +10,28 @@ adapter driver bcm2835gpio -bcm2835gpio_peripheral_base 0x20000000 +bcm2835gpio peripheral_base 0x20000000 # Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET # These depend on system clock, calibrated for stock 700MHz -# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET -bcm2835gpio_speed_coeffs 113714 28 +# bcm2835gpio speed SPEED_COEFF SPEED_OFFSET +bcm2835gpio speed_coeffs 113714 28 # Each of the JTAG lines need a gpio number set: tck tms tdi tdo # Header pin numbers: 23 22 19 21 -bcm2835gpio_jtag_nums 11 25 10 9 +bcm2835gpio jtag_nums 11 25 10 9 # Each of the SWD lines need a gpio number set: swclk swdio # Header pin numbers: 23 22 -bcm2835gpio_swd_nums 11 25 +bcm2835gpio swd_nums 11 25 # If you define trst or srst, use appropriate reset_config # Header pin numbers: TRST - 26, SRST - 18 -# bcm2835gpio_trst_num 7 +# bcm2835gpio trst_num 7 # reset_config trst_only -# bcm2835gpio_srst_num 24 +# bcm2835gpio srst_num 24 # reset_config srst_only srst_push_pull # or if you have both connected, diff --git a/tcl/interface/raspberrypi2-native.cfg b/tcl/interface/raspberrypi2-native.cfg index e53b0f3b0..14c5771c4 100644 --- a/tcl/interface/raspberrypi2-native.cfg +++ b/tcl/interface/raspberrypi2-native.cfg @@ -10,28 +10,28 @@ adapter driver bcm2835gpio -bcm2835gpio_peripheral_base 0x3F000000 +bcm2835gpio peripheral_base 0x3F000000 # Transition delay calculation: SPEED_COEFF/khz - SPEED_OFFSET # These depend on system clock, calibrated for stock 700MHz -# bcm2835gpio_speed SPEED_COEFF SPEED_OFFSET -bcm2835gpio_speed_coeffs 146203 36 +# bcm2835gpio speed SPEED_COEFF SPEED_OFFSET +bcm2835gpio speed_coeffs 146203 36 # Each of the JTAG lines need a gpio number set: tck tms tdi tdo # Header pin numbers: 23 22 19 21 -bcm2835gpio_jtag_nums 11 25 10 9 +bcm2835gpio jtag_nums 11 25 10 9 # Each of the SWD lines need a gpio number set: swclk swdio # Header pin numbers: 23 22 -bcm2835gpio_swd_nums 11 25 +bcm2835gpio swd_nums 11 25 # If you define trst or srst, use appropriate reset_config # Header pin numbers: TRST - 26, SRST - 18 -# bcm2835gpio_trst_num 7 +# bcm2835gpio trst_num 7 # reset_config trst_only -# bcm2835gpio_srst_num 24 +# bcm2835gpio srst_num 24 # reset_config srst_only srst_push_pull # or if you have both connected, commit 2fdf6788e20d53f8368f508de5ff39627d8ce27a Author: Marc Schink <de...@za...> Date: Fri Jul 30 18:29:01 2021 +0200 drivers/bcm2835gpio: Group adapter commands Use a command group 'bcm2835gpio' with subcommands instead of individual commands with 'bcm2835gpio_' prefix. The old commands are still available for backward compatibility but marked as deprecated. Change-Id: I8f7b14273b1b2813ac3c9704605d175fa2053008 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6396 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/openocd.texi b/doc/openocd.texi index aec6bbe4f..5aab4ba1d 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3197,67 +3197,67 @@ configuration on exit. See @file{interface/raspberrypi-native.cfg} for a sample config and pinout. -@deffn {Config Command} {bcm2835gpio_jtag_nums} @var{tck} @var{tms} @var{tdi} @var{tdo} +@deffn {Config Command} {bcm2835gpio jtag_nums} @var{tck} @var{tms} @var{tdi} @var{tdo} Set JTAG transport GPIO numbers for TCK, TMS, TDI, and TDO (in that order). Must be specified to enable JTAG transport. These pins can also be specified individually. @end deffn -@deffn {Config Command} {bcm2835gpio_tck_num} @var{tck} +@deffn {Config Command} {bcm2835gpio tck_num} @var{tck} Set TCK GPIO number. Must be specified to enable JTAG transport. Can also be -specified using the configuration command bcm2835gpio_jtag_nums. +specified using the configuration command @command{bcm2835gpio jtag_nums}. @end deffn -@deffn {Config Command} {bcm2835gpio_tms_num} @var{tms} +@deffn {Config Command} {bcm2835gpio tms_num} @var{tms} Set TMS GPIO number. Must be specified to enable JTAG transport. Can also be -specified using the configuration command bcm2835gpio_jtag_nums. +specified using the configuration command @command{bcm2835gpio jtag_nums}. @end deffn -@deffn {Config Command} {bcm2835gpio_tdo_num} @var{tdo} +@deffn {Config Command} {bcm2835gpio tdo_num} @var{tdo} Set TDO GPIO number. Must be specified to enable JTAG transport. Can also be -specified using the configuration command bcm2835gpio_jtag_nums. +specified using the configuration command @command{bcm2835gpio jtag_nums}. @end deffn -@deffn {Config Command} {bcm2835gpio_tdi_num} @var{tdi} +@deffn {Config Command} {bcm2835gpio tdi_num} @var{tdi} Set TDI GPIO number. Must be specified to enable JTAG transport. Can also be -specified using the configuration command bcm2835gpio_jtag_nums. +specified using the configuration command @command{bcm2835gpio jtag_nums}. @end deffn -@deffn {Config Command} {bcm2835gpio_swd_nums} @var{swclk} @var{swdio} +@deffn {Config Command} {bcm2835gpio swd_nums} @var{swclk} @var{swdio} Set SWD transport GPIO numbers for SWCLK and SWDIO (in that order). Must be specified to enable SWD transport. These pins can also be specified individually. @end deffn -@deffn {Config Command} {bcm2835gpio_swclk_num} @var{swclk} +@deffn {Config Command} {bcm2835gpio swclk_num} @var{swclk} Set SWCLK GPIO number. Must be specified to enable SWD transport. Can also be -specified using the configuration command bcm2835gpio_swd_nums. +specified using the configuration command @command{bcm2835gpio swd_nums}. @end deffn -@deffn {Config Command} {bcm2835gpio_swdio_num} @var{swdio} +@deffn {Config Command} {bcm2835gpio swdio_num} @var{swdio} Set SWDIO GPIO number. Must be specified to enable SWD transport. Can also be -specified using the configuration command bcm2835gpio_swd_nums. +specified using the configuration command @command{bcm2835gpio swd_nums}. @end deffn -@deffn {Config Command} {bcm2835gpio_swdio_dir_num} @var{swdio} @var{dir} +@deffn {Config Command} {bcm2835gpio swdio_dir_num} @var{swdio} @var{dir} Set SWDIO direction control pin GPIO number. If specified, this pin can be used to control the direction of an external buffer on the SWDIO pin (set=output mode, clear=input mode). If not specified, this feature is disabled. @end deffn -@deffn {Config Command} {bcm2835gpio_srst_num} @var{srst} +@deffn {Config Command} {bcm2835gpio srst_num} @var{srst} Set SRST GPIO number. Must be specified to enable SRST. @end deffn -@deffn {Config Command} {bcm2835gpio_trst_num} @var{trst} +@deffn {Config Command} {bcm2835gpio trst_num} @var{trst} Set TRST GPIO number. Must be specified to enable TRST. @end deffn -@deffn {Config Command} {bcm2835gpio_speed_coeffs} @var{speed_coeff} @var{speed_offset} +@deffn {Config Command} {bcm2835gpio speed_coeffs} @var{speed_coeff} @var{speed_offset} Set SPEED_COEFF and SPEED_OFFSET for delay calculations. If unspecified, speed_coeff defaults to 113714, and speed_offset defaults to 28. @end deffn -@deffn {Config Command} {bcm2835gpio_peripheral_base} @var{base} +@deffn {Config Command} {bcm2835gpio peripheral_base} @var{base} Set the peripheral base register address to access GPIOs. For the RPi1, use 0x20000000. For RPi2 and RPi3, use 0x3F000000. For RPi4, use 0xFE000000. A full list can be found in the diff --git a/src/jtag/drivers/bcm2835gpio.c b/src/jtag/drivers/bcm2835gpio.c index 6db4340e8..95e077c33 100644 --- a/src/jtag/drivers/bcm2835gpio.c +++ b/src/jtag/drivers/bcm2835gpio.c @@ -338,93 +338,93 @@ COMMAND_HANDLER(bcm2835gpio_handle_peripheral_base) return ERROR_OK; } -static const struct command_registration bcm2835gpio_command_handlers[] = { +static const struct command_registration bcm2835gpio_subcommand_handlers[] = { { - .name = "bcm2835gpio_jtag_nums", + .name = "jtag_nums", .handler = &bcm2835gpio_handle_jtag_gpionums, .mode = COMMAND_CONFIG, .help = "gpio numbers for tck, tms, tdi, tdo. (in that order)", .usage = "[tck tms tdi tdo]", }, { - .name = "bcm2835gpio_tck_num", + .name = "tck_num", .handler = &bcm2835gpio_handle_jtag_gpionum_tck, .mode = COMMAND_CONFIG, .help = "gpio number for tck.", .usage = "[tck]", }, { - .name = "bcm2835gpio_tms_num", + .name = "tms_num", .handler = &bcm2835gpio_handle_jtag_gpionum_tms, .mode = COMMAND_CONFIG, .help = "gpio number for tms.", .usage = "[tms]", }, { - .name = "bcm2835gpio_tdo_num", + .name = "tdo_num", .handler = &bcm2835gpio_handle_jtag_gpionum_tdo, .mode = COMMAND_CONFIG, .help = "gpio number for tdo.", .usage = "[tdo]", }, { - .name = "bcm2835gpio_tdi_num", + .name = "tdi_num", .handler = &bcm2835gpio_handle_jtag_gpionum_tdi, .mode = COMMAND_CONFIG, .help = "gpio number for tdi.", .usage = "[tdi]", }, { - .name = "bcm2835gpio_swd_nums", + .name = "swd_nums", .handler = &bcm2835gpio_handle_swd_gpionums, .mode = COMMAND_CONFIG, .help = "gpio numbers for swclk, swdio. (in that order)", .usage = "[swclk swdio]", }, { - .name = "bcm2835gpio_swclk_num", + .name = "swclk_num", .handler = &bcm2835gpio_handle_swd_gpionum_swclk, .mode = COMMAND_CONFIG, .help = "gpio number for swclk.", .usage = "[swclk]", }, { - .name = "bcm2835gpio_swdio_num", + .name = "swdio_num", .handler = &bcm2835gpio_handle_swd_gpionum_swdio, .mode = COMMAND_CONFIG, .help = "gpio number for swdio.", .usage = "[swdio]", }, { - .name = "bcm2835gpio_swdio_dir_num", + .name = "swdio_dir_num", .handler = &bcm2835gpio_handle_swd_dir_gpionum_swdio, .mode = COMMAND_CONFIG, .help = "gpio number for swdio direction control pin (set=output mode, clear=input mode)", .usage = "[swdio_dir]", }, { - .name = "bcm2835gpio_srst_num", + .name = "srst_num", .handler = &bcm2835gpio_handle_jtag_gpionum_srst, .mode = COMMAND_CONFIG, .help = "gpio number for srst.", .usage = "[srst]", }, { - .name = "bcm2835gpio_trst_num", + .name = "trst_num", .handler = &bcm2835gpio_handle_jtag_gpionum_trst, .mode = COMMAND_CONFIG, .help = "gpio number for trst.", .usage = "[trst]", }, { - .name = "bcm2835gpio_speed_coeffs", + .name = "speed_coeffs", .handler = &bcm2835gpio_handle_speed_coeffs, .mode = COMMAND_CONFIG, .help = "SPEED_COEFF and SPEED_OFFSET for delay calculations.", .usage = "[SPEED_COEFF SPEED_OFFSET]", }, { - .name = "bcm2835gpio_peripheral_base", + .name = "peripheral_base", .handler = &bcm2835gpio_handle_peripheral_base, .mode = COMMAND_CONFIG, .help = "peripheral base to access GPIOs (RPi1 0x20000000, RPi2 0x3F000000).", @@ -434,6 +434,17 @@ static const struct command_registration bcm2835gpio_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration bcm2835gpio_command_handlers[] = { + { + .name = "bcm2835gpio", + .mode = COMMAND_ANY, + .help = "perform bcm2835gpio management", + .chain = bcm2835gpio_subcommand_handlers, + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static const char * const bcm2835_transports[] = { "jtag", "swd", NULL }; static struct jtag_interface bcm2835gpio_interface = { diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index 263cde255..4217d2335 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -375,4 +375,82 @@ proc vsllink_usb_interface args { eval vsllink usb_interface $args } +lappend _telnet_autocomplete_skip bcm2835gpio_jtag_nums +proc bcm2835gpio_jtag_nums args { + echo "DEPRECATED! use 'bcm2835gpio jtag_nums' not 'bcm2835gpio_jtag_nums'" + eval bcm2835gpio jtag_nums $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_tck_num +proc bcm2835gpio_tck_num args { + echo "DEPRECATED! use 'bcm2835gpio tck_num' not 'bcm2835gpio_tck_num'" + eval bcm2835gpio tck_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_tms_num +proc bcm2835gpio_tms_num args { + echo "DEPRECATED! use 'bcm2835gpio tms_num' not 'bcm2835gpio_tms_num'" + eval bcm2835gpio tms_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_tdo_num +proc bcm2835gpio_tdo_num args { + echo "DEPRECATED! use 'bcm2835gpio tdo_num' not 'bcm2835gpio_tdo_num'" + eval bcm2835gpio tdo_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_tdi_num +proc bcm2835gpio_tdi_num args { + echo "DEPRECATED! use 'bcm2835gpio tdi_num' not 'bcm2835gpio_tdi_num'" + eval bcm2835gpio tdi_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_swd_nums +proc bcm2835gpio_swd_nums args { + echo "DEPRECATED! use 'bcm2835gpio swd_nums' not 'bcm2835gpio_swd_nums'" + eval bcm2835gpio swd_nums $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_swclk_num +proc bcm2835gpio_swclk_num args { + echo "DEPRECATED! use 'bcm2835gpio swclk_num' not 'bcm2835gpio_swclk_num'" + eval bcm2835gpio swclk_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_swdio_num +proc bcm2835gpio_swdio_num args { + echo "DEPRECATED! use 'bcm2835gpio swdio_num' not 'bcm2835gpio_swdio_num'" + eval bcm2835gpio swdio_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_swdio_dir_num +proc bcm2835gpio_swdio_dir_num args { + echo "DEPRECATED! use 'bcm2835gpio swdio_dir_num' not 'bcm2835gpio_swdio_dir_num'" + eval bcm2835gpio swdio_dir_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_srst_num +proc bcm2835gpio_srst_num args { + echo "DEPRECATED! use 'bcm2835gpio srst_num' not 'bcm2835gpio_srst_num'" + eval bcm2835gpio srst_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_trst_num +proc bcm2835gpio_trst_num args { + echo "DEPRECATED! use 'bcm2835gpio trst_num' not 'bcm2835gpio_trst_num'" + eval bcm2835gpio trst_num $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_speed_coeffs +proc bcm2835gpio_speed_coeffs args { + echo "DEPRECATED! use 'bcm2835gpio speed_coeffs' not 'bcm2835gpio_speed_coeffs'" + eval bcm2835gpio speed_coeffs $args +} + +lappend _telnet_autocomplete_skip bcm2835gpio_peripheral_base +proc bcm2835gpio_peripheral_base args { + echo "DEPRECATED! use 'bcm2835gpio peripheral_base' not 'bcm2835gpio_peripheral_base'" + eval bcm2835gpio peripheral_base $args +} + # END MIGRATION AIDS ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 38 +++++++------- src/jtag/drivers/bcm2835gpio.c | 39 +++++++++----- src/jtag/drivers/jtag_vpi.c | 19 +++++-- src/jtag/startup.tcl | 96 +++++++++++++++++++++++++++++++++++ tcl/interface/raspberrypi-native.cfg | 14 ++--- tcl/interface/raspberrypi2-native.cfg | 14 ++--- 6 files changed, 169 insertions(+), 51 deletions(-) hooks/post-receive -- Main OpenOCD repository |