From: OpenOCD-Gerrit <ope...@us...> - 2021-08-14 12:34:14
|
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 dd04079c2c15bbdb0460342284c96812f4c78d87 (commit) via de5c752102b54ca91895094fa6b867f0c20d21ac (commit) via 3ce92fa33ded60a0f03f51dae49dcb0236c33a6f (commit) via fbbf63f6597e825158960c8f65d7aa91ce0a1f00 (commit) from 38f94a26772f2e1c99e4e65ac1b60bc9e1bb150a (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 dd04079c2c15bbdb0460342284c96812f4c78d87 Author: Marc Schink <de...@za...> Date: Fri Jul 30 17:51:04 2021 +0200 tcl/interface/openjtag: Adapt to new openjtag command syntax Change-Id: I3a9d649dd38a913b1ce6d4a2d506bbf44743d529 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6388 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/interface/openjtag.cfg b/tcl/interface/openjtag.cfg index 9a5827b14..8d015b704 100644 --- a/tcl/interface/openjtag.cfg +++ b/tcl/interface/openjtag.cfg @@ -5,4 +5,4 @@ # adapter driver openjtag -openjtag_device_desc "Open JTAG Project" +openjtag device_desc "Open JTAG Project" commit de5c752102b54ca91895094fa6b867f0c20d21ac Author: Marc Schink <de...@za...> Date: Fri Jul 30 17:50:21 2021 +0200 drivers/openjtag: Group adapter commands Use a command group 'openjtag' with subcommands instead of individual commands with 'openjtag_' prefix. The old commands are still available for backward compatibility but marked as deprecated. Change-Id: Ie1b1bf0b7c03e7703cfb074e554288384bf7b1b9 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6387 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/openocd.texi b/doc/openocd.texi index 1b247578e..c3963d6cb 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3298,7 +3298,7 @@ See @file{interface/sysfsgpio-raspberrypi.cfg} for a sample config. OpenJTAG compatible USB adapter. This defines some driver-specific commands: -@deffn {Config Command} {openjtag_variant} variant +@deffn {Config Command} {openjtag variant} variant Specifies the variant of the OpenJTAG adapter (see @uref{http://www.openjtag.org/}). Currently valid @var{variant} values include: @@ -3309,7 +3309,7 @@ Currently valid @var{variant} values include: @end itemize @end deffn -@deffn {Config Command} {openjtag_device_desc} string +@deffn {Config Command} {openjtag device_desc} string The USB device description string of the adapter. This value is only used with the standard variant. @end deffn diff --git a/src/jtag/drivers/openjtag.c b/src/jtag/drivers/openjtag.c index 7efb0e5e0..123134f51 100644 --- a/src/jtag/drivers/openjtag.c +++ b/src/jtag/drivers/openjtag.c @@ -870,16 +870,16 @@ COMMAND_HANDLER(openjtag_handle_variant_command) return ERROR_OK; } -static const struct command_registration openjtag_command_handlers[] = { +static const struct command_registration openjtag_subcommand_handlers[] = { { - .name = "openjtag_device_desc", + .name = "device_desc", .handler = openjtag_handle_device_desc_command, .mode = COMMAND_CONFIG, .help = "set the USB device description of the OpenJTAG", .usage = "description-string", }, { - .name = "openjtag_variant", + .name = "variant", .handler = openjtag_handle_variant_command, .mode = COMMAND_CONFIG, .help = "set the OpenJTAG variant", @@ -888,6 +888,17 @@ static const struct command_registration openjtag_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration openjtag_command_handlers[] = { + { + .name = "openjtag", + .mode = COMMAND_ANY, + .help = "perform openjtag management", + .chain = openjtag_subcommand_handlers, + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static struct jtag_interface openjtag_interface = { .execute_queue = openjtag_execute_queue, }; diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index d6413e48f..f2e4ec353 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -261,6 +261,18 @@ proc ftdi_tdo_sample_edge args { eval ftdi tdo_sample_edge $args } +lappend _telnet_autocomplete_skip openjtag_device_desc +proc openjtag_device_desc args { + echo "DEPRECATED! use 'openjtag device_desc' not 'openjtag_device_desc'" + eval openjtag device_desc $args +} + +lappend _telnet_autocomplete_skip openjtag_variant +proc openjtag_variant args { + echo "DEPRECATED! use 'openjtag variant' not 'openjtag_variant'" + eval openjtag variant $args +} + lappend _telnet_autocomplete_skip parport_port proc parport_port args { echo "DEPRECATED! use 'parport port' not 'parport_port'" commit 3ce92fa33ded60a0f03f51dae49dcb0236c33a6f Author: Marc Schink <de...@za...> Date: Fri Jul 30 17:43:58 2021 +0200 tcl/interface: Adapt config files to new parport command syntax Change-Id: Iffe7a04c36c6ec680497081a99d55b8c69f8f079 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6386 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/tcl/interface/chameleon.cfg b/tcl/interface/chameleon.cfg index 1cb1d6151..97bf98d27 100644 --- a/tcl/interface/chameleon.cfg +++ b/tcl/interface/chameleon.cfg @@ -5,4 +5,4 @@ # adapter driver parport -parport_cable chameleon +parport cable chameleon diff --git a/tcl/interface/flashlink.cfg b/tcl/interface/flashlink.cfg index e0a4b97d0..b7ec0bb24 100644 --- a/tcl/interface/flashlink.cfg +++ b/tcl/interface/flashlink.cfg @@ -12,5 +12,5 @@ if { [info exists PARPORTADDR] } { } adapter driver parport -parport_port $_PARPORTADDR -parport_cable flashlink +parport port $_PARPORTADDR +parport cable flashlink diff --git a/tcl/interface/parport.cfg b/tcl/interface/parport.cfg index 4c0b260b9..05195f027 100644 --- a/tcl/interface/parport.cfg +++ b/tcl/interface/parport.cfg @@ -15,5 +15,5 @@ if { [info exists PARPORTADDR] } { } adapter driver parport -parport_port $_PARPORTADDR -parport_cable wiggler +parport port $_PARPORTADDR +parport cable wiggler diff --git a/tcl/interface/parport_dlc5.cfg b/tcl/interface/parport_dlc5.cfg index e9beaaf41..19e21ffda 100644 --- a/tcl/interface/parport_dlc5.cfg +++ b/tcl/interface/parport_dlc5.cfg @@ -11,5 +11,5 @@ if { [info exists PARPORTADDR] } { } adapter driver parport -parport_port $_PARPORTADDR -parport_cable dlc5 +parport port $_PARPORTADDR +parport cable dlc5 commit fbbf63f6597e825158960c8f65d7aa91ce0a1f00 Author: Marc Schink <de...@za...> Date: Fri Jul 30 17:39:11 2021 +0200 drivers/parport: Group adapter commands Use a command group 'parport' with subcommands instead of individual commands with 'parport_' prefix. The old commands are still available for backward compatibility but marked as deprecated. Change-Id: I4cb7096a8ba8d6cd7a6dc970862cd73c32b5c0a2 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/6385 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/doc/openocd.texi b/doc/openocd.texi index 3aee034a4..1b247578e 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -2378,7 +2378,7 @@ Amontec Chameleon in its JTAG Accelerator configuration, connected to a PC's EPP mode parallel port. This defines some driver-specific commands: -@deffn {Config Command} {parport_port} number +@deffn {Config Command} {parport port} number Specifies either the address of the I/O port (default: 0x378 for LPT1) or the number of the @file{/dev/parport} device. @end deffn @@ -2779,7 +2779,7 @@ image. To be used with USB-Blaster II only. Gateworks GW16012 JTAG programmer. This has one driver-specific command: -@deffn {Config Command} {parport_port} [port_number] +@deffn {Config Command} {parport port} [port_number] Display either the address of the I/O port (default: 0x378 for LPT1) or the number of the @file{/dev/parport} device. If a parameter is provided, first switch to use that port. @@ -2938,7 +2938,7 @@ Wigglers, PLD download cable, and more. These interfaces have several commands, used to configure the driver before initializing the JTAG scan chain: -@deffn {Config Command} {parport_cable} name +@deffn {Config Command} {parport cable} name Set the layout of the parallel port cable used to connect to the target. This is a write-once setting. Currently valid cable @var{name} values include: @@ -2968,18 +2968,18 @@ several clones, such as the Olimex ARM-JTAG @end itemize @end deffn -@deffn {Config Command} {parport_port} [port_number] +@deffn {Config Command} {parport port} [port_number] Display either the address of the I/O port (default: 0x378 for LPT1) or the number of the @file{/dev/parport} device. If a parameter is provided, first switch to use that port. This is a write-once setting. When using PPDEV to access the parallel port, use the number of the parallel port: -@option{parport_port 0} (the default). If @option{parport_port 0x378} is specified +@option{parport port 0} (the default). If @option{parport port 0x378} is specified you may encounter a problem. @end deffn -@deffn {Config Command} {parport_toggling_time} [nanoseconds] +@deffn {Config Command} {parport toggling_time} [nanoseconds] Displays how many nanoseconds the hardware needs to toggle TCK; the parport driver uses this value to obey the @command{adapter speed} configuration. @@ -2992,7 +2992,7 @@ However, you may want to calibrate for your specific hardware. To measure the toggling time with a logic analyzer or a digital storage oscilloscope, follow the procedure below: @example -> parport_toggling_time 1000 +> parport toggling_time 1000 > adapter speed 500 @end example This sets the maximum JTAG clock speed of the hardware, but @@ -3002,7 +3002,7 @@ You can use @command{runtest 1000} or something similar to generate a large set of samples. Update the setting to match your measurement: @example -> parport_toggling_time <measured nanoseconds> +> parport toggling_time <measured nanoseconds> @end example Now the clock speed will be a better match for @command{adapter speed} command given in OpenOCD scripts and event handlers. @@ -3016,7 +3016,7 @@ be conservative. @end quotation @end deffn -@deffn {Config Command} {parport_write_on_exit} (@option{on}|@option{off}) +@deffn {Config Command} {parport write_on_exit} (@option{on}|@option{off}) This will configure the parallel driver to write a known cable-specific value to the parallel interface on exiting OpenOCD. @end deffn @@ -3026,8 +3026,8 @@ classic ``Wiggler'' cable on LPT2 might look something like this: @example adapter driver parport -parport_port 0x278 -parport_cable wiggler +parport port 0x278 +parport cable wiggler @end example @end deffn diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c index 1d7fcc44d..d50d306d3 100644 --- a/src/jtag/drivers/parport.c +++ b/src/jtag/drivers/parport.c @@ -473,9 +473,9 @@ COMMAND_HANDLER(parport_handle_parport_toggling_time_command) return ERROR_OK; } -static const struct command_registration parport_command_handlers[] = { +static const struct command_registration parport_subcommand_handlers[] = { { - .name = "parport_port", + .name = "port", .handler = parport_handle_parport_port_command, .mode = COMMAND_CONFIG, .help = "Display the address of the I/O port (e.g. 0x378) " @@ -484,7 +484,7 @@ static const struct command_registration parport_command_handlers[] = { .usage = "[port_number]", }, { - .name = "parport_cable", + .name = "cable", .handler = parport_handle_parport_cable_command, .mode = COMMAND_CONFIG, .help = "Set the layout of the parallel port cable " @@ -493,7 +493,7 @@ static const struct command_registration parport_command_handlers[] = { .usage = "[layout]", }, { - .name = "parport_write_on_exit", + .name = "write_on_exit", .handler = parport_handle_write_on_exit_command, .mode = COMMAND_CONFIG, .help = "Configure the parallel driver to write " @@ -501,7 +501,7 @@ static const struct command_registration parport_command_handlers[] = { .usage = "('on'|'off')", }, { - .name = "parport_toggling_time", + .name = "toggling_time", .handler = parport_handle_parport_toggling_time_command, .mode = COMMAND_CONFIG, .help = "Displays or assigns how many nanoseconds it " @@ -511,6 +511,17 @@ static const struct command_registration parport_command_handlers[] = { COMMAND_REGISTRATION_DONE }; +static const struct command_registration parport_command_handlers[] = { + { + .name = "parport", + .mode = COMMAND_ANY, + .help = "perform parport management", + .chain = parport_subcommand_handlers, + .usage = "", + }, + COMMAND_REGISTRATION_DONE +}; + static struct jtag_interface parport_interface = { .supported = DEBUG_CAP_TMS_SEQ, .execute_queue = bitbang_execute_queue, diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl index 472a9f283..d6413e48f 100644 --- a/src/jtag/startup.tcl +++ b/src/jtag/startup.tcl @@ -261,4 +261,28 @@ proc ftdi_tdo_sample_edge args { eval ftdi tdo_sample_edge $args } +lappend _telnet_autocomplete_skip parport_port +proc parport_port args { + echo "DEPRECATED! use 'parport port' not 'parport_port'" + eval parport port $args +} + +lappend _telnet_autocomplete_skip parport_cable +proc parport_cable args { + echo "DEPRECATED! use 'parport cable' not 'parport_cable'" + eval parport cable $args +} + +lappend _telnet_autocomplete_skip parport_write_on_exit +proc parport_write_on_exit args { + echo "DEPRECATED! use 'parport write_on_exit' not 'parport_write_on_exit'" + eval parport write_on_exit $args +} + +lappend _telnet_autocomplete_skip parport_toggling_time +proc parport_toggling_time args { + echo "DEPRECATED! use 'parport toggling_time' not 'parport_toggling_time'" + eval parport toggling_time $args +} + # END MIGRATION AIDS ----------------------------------------------------------------------- Summary of changes: doc/openocd.texi | 26 +++++++++++++------------- src/jtag/drivers/openjtag.c | 17 ++++++++++++++--- src/jtag/drivers/parport.c | 21 ++++++++++++++++----- src/jtag/startup.tcl | 36 ++++++++++++++++++++++++++++++++++++ tcl/interface/chameleon.cfg | 2 +- tcl/interface/flashlink.cfg | 4 ++-- tcl/interface/openjtag.cfg | 2 +- tcl/interface/parport.cfg | 4 ++-- tcl/interface/parport_dlc5.cfg | 4 ++-- 9 files changed, 87 insertions(+), 29 deletions(-) hooks/post-receive -- Main OpenOCD repository |