aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2015-04-03 07:55:50 +0300
committerPaul Fertser <fercerpav@gmail.com>2015-04-14 12:35:39 +0100
commite51d591641c9a9cd0af9c4c2200d7051c4a88ef0 (patch)
tree3f6b3060ce1433ad7e530cdc4a89ad4e3100fa5c
parent7090edc813525caaade84a6322fdce89d3cd8f6a (diff)
jtag/startup.tcl: fix regression with autoselecting JTAG
This regression was introduced with d90b86d8. "transport select" doesn't throw an error anymore and autoselects the first available transport on its own. Reported by moyix on IRC. Change-Id: I3f303c0372e915931cca4b28af450694abc1a63e Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2693 Tested-by: jenkins
-rw-r--r--src/jtag/startup.tcl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jtag/startup.tcl b/src/jtag/startup.tcl
index f88ef1fa..d57cafb2 100644
--- a/src/jtag/startup.tcl
+++ b/src/jtag/startup.tcl
@@ -89,9 +89,8 @@ proc measure_clk {} {
add_help_text measure_clk "Runs a test to measure the JTAG clk. Useful with RCLK / RTCK."
proc default_to_jtag { f args } {
- if [catch {transport select} current_transport] {
- echo "Info : session transport was not selected, defaulting to JTAG"
- transport select jtag
+ set current_transport [transport select]
+ if {[using_jtag]} {
eval $f $args
} {
error "session transport is \"$current_transport\" but your config requires JTAG"