startup.tcl: prepare for jimtcl 0.81 'expr' syntax change
Jimtcl commit 1843b79a03dd ("expr: TIP 526, only support a single arg") drops the support for multi-argument syntax for the TCL command 'expr'. Modify the script startup.tcl compiled-in OpenOCD binary to comply with the new jimtcl. Change-Id: I520dcafacadaa289a815035f93f250447ca66ea0 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6158 Tested-by: jenkins Reviewed-by: Oleksij Rempel <linux@rempel-privat.de> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
223b79ebe2
commit
82b6a41117
|
@ -81,9 +81,10 @@ proc srst_asserted {} {
|
||||||
# measure actual JTAG clock
|
# measure actual JTAG clock
|
||||||
proc measure_clk {} {
|
proc measure_clk {} {
|
||||||
set start_time [ms];
|
set start_time [ms];
|
||||||
set iterations 10000000;
|
set iterations 10000000;
|
||||||
runtest $iterations;
|
runtest $iterations;
|
||||||
echo "Running at more than [expr $iterations.0 / ([ms]-$start_time)] kHz";
|
set speed [expr "$iterations.0 / ([ms] - $start_time)"]
|
||||||
|
echo "Running at more than $speed kHz";
|
||||||
}
|
}
|
||||||
|
|
||||||
add_help_text measure_clk "Runs a test to measure the JTAG clk. Useful with RCLK / RTCK."
|
add_help_text measure_clk "Runs a test to measure the JTAG clk. Useful with RCLK / RTCK."
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Defines basic Tcl procs for OpenOCD target module
|
# Defines basic Tcl procs for OpenOCD target module
|
||||||
|
|
||||||
proc new_target_name { } {
|
proc new_target_name { } {
|
||||||
return [target number [expr [target count] - 1 ]]
|
return [target number [expr {[target count] - 1}]]
|
||||||
}
|
}
|
||||||
|
|
||||||
global in_process_reset
|
global in_process_reset
|
||||||
|
@ -16,7 +16,7 @@ proc ocd_process_reset { MODE } {
|
||||||
}
|
}
|
||||||
|
|
||||||
set in_process_reset 1
|
set in_process_reset 1
|
||||||
set success [expr [catch {ocd_process_reset_inner $MODE} result]==0]
|
set success [expr {[catch {ocd_process_reset_inner $MODE} result] == 0}]
|
||||||
set in_process_reset 0
|
set in_process_reset 0
|
||||||
|
|
||||||
if {$success} {
|
if {$success} {
|
||||||
|
|
Loading…
Reference in New Issue