tcl: introduce using_(jtag|swd|hla) helpers and use them in reset handler

Barely tested with plain SWD transport.

Change-Id: I48b59136bf4294ffed737dba01f1b30ef83aa86b
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2003
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
Paul Fertser
2014-03-01 22:40:54 +04:00
committed by Andreas Fritiofson
parent 36772a7ed0
commit f8a6a07149
14 changed files with 42 additions and 30 deletions

View File

@@ -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
}