aboutsummaryrefslogtreecommitdiff
path: root/tcl/target
diff options
context:
space:
mode:
Diffstat (limited to 'tcl/target')
-rw-r--r--tcl/target/1986ве1т.cfg2
-rw-r--r--tcl/target/at91sam3XXX.cfg2
-rw-r--r--tcl/target/at91sam4XXX.cfg2
-rw-r--r--tcl/target/lpc17xx.cfg2
-rw-r--r--tcl/target/mdr32f9q2i.cfg2
-rw-r--r--tcl/target/stm32f1x.cfg4
-rw-r--r--tcl/target/stm32f2x.cfg4
-rw-r--r--tcl/target/stm32f3x.cfg4
-rw-r--r--tcl/target/stm32f4x.cfg4
-rw-r--r--tcl/target/stm32l.cfg4
-rw-r--r--tcl/target/stm32w108xx.cfg2
-rw-r--r--tcl/target/swj-dp.tcl11
12 files changed, 19 insertions, 24 deletions
diff --git a/tcl/target/1986ве1т.cfg b/tcl/target/1986ве1т.cfg
index 0338297a..c76a2111 100644
--- a/tcl/target/1986ве1т.cfg
+++ b/tcl/target/1986ве1т.cfg
@@ -48,7 +48,7 @@ if { [info exists IMEMORY] && [string equal $IMEMORY true] } {
adapter_khz 1000
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
diff --git a/tcl/target/at91sam3XXX.cfg b/tcl/target/at91sam3XXX.cfg
index f36475b6..caadc536 100644
--- a/tcl/target/at91sam3XXX.cfg
+++ b/tcl/target/at91sam3XXX.cfg
@@ -76,7 +76,7 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
adapter_khz 500
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
diff --git a/tcl/target/at91sam4XXX.cfg b/tcl/target/at91sam4XXX.cfg
index cc2941a8..15701140 100644
--- a/tcl/target/at91sam4XXX.cfg
+++ b/tcl/target/at91sam4XXX.cfg
@@ -56,7 +56,7 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
adapter_khz 500
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
diff --git a/tcl/target/lpc17xx.cfg b/tcl/target/lpc17xx.cfg
index 372107f7..266cecb6 100644
--- a/tcl/target/lpc17xx.cfg
+++ b/tcl/target/lpc17xx.cfg
@@ -72,7 +72,7 @@ adapter_khz 10
# delays on reset lines
adapter_nsrst_delay 200
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 200
}
diff --git a/tcl/target/mdr32f9q2i.cfg b/tcl/target/mdr32f9q2i.cfg
index 8e8262d7..961451e0 100644
--- a/tcl/target/mdr32f9q2i.cfg
+++ b/tcl/target/mdr32f9q2i.cfg
@@ -46,7 +46,7 @@ if { [info exists IMEMORY] && [string equal $IMEMORY true] } {
adapter_khz 1000
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
diff --git a/tcl/target/stm32f1x.cfg b/tcl/target/stm32f1x.cfg
index f32654a5..c89a5b55 100644
--- a/tcl/target/stm32f1x.cfg
+++ b/tcl/target/stm32f1x.cfg
@@ -61,7 +61,7 @@ if { [info exists BSTAPID] } {
set _BSTAPID9 0x06428041
}
-if {$using_jtag} {
+if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \
@@ -82,7 +82,7 @@ flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME
adapter_khz 1000
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
diff --git a/tcl/target/stm32f2x.cfg b/tcl/target/stm32f2x.cfg
index 5022ef7d..4e43f0a1 100644
--- a/tcl/target/stm32f2x.cfg
+++ b/tcl/target/stm32f2x.cfg
@@ -34,7 +34,7 @@ if { [info exists WORKAREASIZE] } {
adapter_khz 1000
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
@@ -58,7 +58,7 @@ if { [info exists BSTAPID] } {
set _BSTAPID 0x06411041
}
-if {$using_jtag} {
+if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
}
diff --git a/tcl/target/stm32f3x.cfg b/tcl/target/stm32f3x.cfg
index 3d68c4bf..ec5941bd 100644
--- a/tcl/target/stm32f3x.cfg
+++ b/tcl/target/stm32f3x.cfg
@@ -34,7 +34,7 @@ if { [info exists WORKAREASIZE] } {
adapter_khz 1000
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
@@ -58,7 +58,7 @@ if { [info exists BSTAPID] } {
set _BSTAPID2 0x06432041
}
-if {$using_jtag} {
+if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 -expected-id $_BSTAPID2
}
diff --git a/tcl/target/stm32f4x.cfg b/tcl/target/stm32f4x.cfg
index feca77c7..30ec686c 100644
--- a/tcl/target/stm32f4x.cfg
+++ b/tcl/target/stm32f4x.cfg
@@ -47,7 +47,7 @@ if { [info exists BSTAPID] } {
set _BSTAPID2 0x06419041
}
-if {$using_jtag} {
+if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2
}
@@ -69,7 +69,7 @@ flash bank $_FLASHNAME stm32f2x 0 0 0 0 $_TARGETNAME
adapter_khz 1000
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
diff --git a/tcl/target/stm32l.cfg b/tcl/target/stm32l.cfg
index f9f7425b..5d6a53e0 100644
--- a/tcl/target/stm32l.cfg
+++ b/tcl/target/stm32l.cfg
@@ -30,7 +30,7 @@ if { [info exists WORKAREASIZE] } {
adapter_khz 100
adapter_nsrst_delay 100
-if {$using_jtag} {
+if {[using_jtag]} {
jtag_ntrst_delay 100
}
@@ -54,7 +54,7 @@ if { [info exists BSTAPID] } {
set _BSTAPID 0x06416041
}
-if {$using_jtag} {
+if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
}
diff --git a/tcl/target/stm32w108xx.cfg b/tcl/target/stm32w108xx.cfg
index 4bc51fc0..faea0d82 100644
--- a/tcl/target/stm32w108xx.cfg
+++ b/tcl/target/stm32w108xx.cfg
@@ -38,7 +38,7 @@ if { [info exists ENDIAN] } {
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
-if {$using_jtag} {
+if {[using_jtag]} {
if { [info exists BSTAPID] } {
set _BSTAPID $BSTAPID
jtag newtap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf -expected-id 0x269a862b
diff --git a/tcl/target/swj-dp.tcl b/tcl/target/swj-dp.tcl
index fa44583a..bd348e66 100644
--- a/tcl/target/swj-dp.tcl
+++ b/tcl/target/swj-dp.tcl
@@ -18,13 +18,8 @@
# split out "chip" and "tag" so we can someday handle
# them more uniformly irlen too...)
-global using_jtag
-set using_jtag 1
-
proc swj_newdap {chip tag args} {
- global using_jtag
- set tran [transport select]
- if [string equal $tran "jtag"] { eval jtag newtap $chip $tag $args; set using_jtag 1 }
- if [string equal $tran "swd"] { eval swd newdap $chip $tag $args; set using_jtag 0 }
- if [string equal $tran "cmsis-dap"] { eval cmsis-dap newdap $chip $tag $args; set using_jtag 0 }
+ if {[using_jtag]} { eval jtag newtap $chip $tag $args }
+ if {[using_swd]} { eval swd newdap $chip $tag $args }
+ if {[string equal [transport select] "cmsis-dap"]} { eval cmsis-dap newdap $chip $tag $args }
}