This is an automated email from Gerrit. Marc Schink ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4917
-- gerrit commit 2829760f4b029c89e977e0c496454f8b7bc4d6e1 Author: Marc Schink <[email protected]> Date: Thu Feb 14 16:43:42 2019 +0100 adapter: Rename command 'khz' to 'speed' See 'adapter related commands refactoring' discussion on the mailing list. Change-Id: Ie6b2f246cca54a60d575b60c09e6ca127910bff2 Signed-off-by: Marc Schink <[email protected]> diff --git a/doc/openocd.texi b/doc/openocd.texi index dea4d21..19d19c6 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -1562,7 +1562,7 @@ solution just avoids using that instruction with JTAG debuggers. If both the chip and the board support adaptive clocking, use the @command{jtag_rclk} command, in case your board is used with JTAG adapter which -also supports it. Otherwise use @command{adapter_khz}. +also supports it. Otherwise use @command{adapter speed}. Set the slow rate at the beginning of the reset sequence, and the faster rate as soon as the clocks are at full speed. @@ -1602,12 +1602,12 @@ proc init_board @{@} @{ reset_config trst_and_srst trst_pulls_srst $_TARGETNAME configure -event reset-start @{ - adapter_khz 100 + adapter speed 100 @} $_TARGETNAME configure -event reset-init @{ enable_fast_clock - adapter_khz 10000 + adapter speed 10000 @} @} @end example @@ -2915,7 +2915,7 @@ you may encounter a problem. @deffn 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_khz} configuration. +@command{adapter speed} configuration. When the optional @var{nanoseconds} parameter is given, that setting is changed before displaying the current value. @@ -2926,7 +2926,7 @@ To measure the toggling time with a logic analyzer or a digital storage oscilloscope, follow the procedure below: @example > parport_toggling_time 1000 -> adapter_khz 500 +> adapter speed 500 @end example This sets the maximum JTAG clock speed of the hardware, but the actual speed probably deviates from the requested 500 kHz. @@ -2937,14 +2937,14 @@ Update the setting to match your measurement: @example > parport_toggling_time <measured nanoseconds> @end example -Now the clock speed will be a better match for @command{adapter_khz rate} +Now the clock speed will be a better match for @command{adapter speed} rate commands given in OpenOCD scripts and event handlers. You can do something similar with many digital multimeters, but note that you'll probably need to run the clock continuously for several seconds before it decides what clock rate to show. Adjust the toggling time up or down until the measured clock rate is a good -match for the adapter_khz rate you specified; be conservative. +match for the @command{adapter speed} rate you specified; be conservative. @end quotation @end deffn @@ -3207,10 +3207,10 @@ However, it introduces delays to synchronize clocks; so it may not be the fastest solution. @b{NOTE:} Script writers should consider using @command{jtag_rclk} -instead of @command{adapter_khz}, but only for (ARM) cores and boards +instead of @command{adapter speed}, but only for (ARM) cores and boards which support adaptive clocking. -@deffn {Command} adapter_khz max_speed_kHz +@deffn {Command} adapter speed max_speed_kHz A non-zero speed is in KHZ. Hence: 3000 is 3mhz. JTAG interfaces usually support a limited number of speeds. The speed actually used won't be faster @@ -4748,7 +4748,7 @@ the target clocks are fully set up.) before @command{reset-assert-pre} is called. This is the most robust place to use @command{jtag_rclk} -or @command{adapter_khz} to switch to a low JTAG clock rate, +or @command{adapter speed} to switch to a low JTAG clock rate, when reset disables PLLs needed to use a fast clock. @item @b{resume-start} @* Before any target is resumed @@ -10265,7 +10265,7 @@ To set the JTAG frequency use the command: @example # Example: 1.234MHz -adapter_khz 1234 +adapter speed 1234 @end example diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c index 6f21495..e68d26b 100644 --- a/src/jtag/adapter.c +++ b/src/jtag/adapter.c @@ -429,7 +429,7 @@ COMMAND_HANDLER(handle_adapter_nsrst_assert_width_command) return ERROR_OK; } -COMMAND_HANDLER(handle_adapter_khz_command) +COMMAND_HANDLER(handle_adapter_speed_command) { if (CMD_ARGC > 1) return ERROR_COMMAND_SYNTAX_ERROR; @@ -511,8 +511,8 @@ static const struct command_registration adapter_command_handlers[] = { .usage = "driver_name", }, { - .name = "khz", - .handler = handle_adapter_khz_command, + .name = "speed", + .handler = handle_adapter_speed_command, .mode = COMMAND_ANY, .help = "With an argument, change to the specified maximum " "jtag speed. For JTAG, 0 KHz signifies adaptive " diff --git a/src/target/startup.tcl b/src/target/startup.tcl index 6317b94..b0f0c57 100644 --- a/src/target/startup.tcl +++ b/src/target/startup.tcl @@ -224,8 +224,8 @@ proc cortex_a8 args { # deprecated adapter cmds proc adapter_khz args { - echo "DEPRECATED! use 'adapter khz' not 'adapter_khz'" - eval adapter khz $args + echo "DEPRECATED! use 'adapter speed' not 'adapter_khz'" + eval adapter speed $args } proc adapter_name args { -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
