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>
14 files changed:
# startup (at OpenOCD server startup, when JTAG may not yet work); and
# potentially more (for reset types like cold, warm, etc)
proc init_reset { mode } {
# startup (at OpenOCD server startup, when JTAG may not yet work); and
# potentially more (for reset types like cold, warm, etc)
proc init_reset { mode } {
+ if {[using_jtag]} {
+ jtag arp_init-reset
+ }
# Examine all targets on enabled taps.
foreach t $targets {
# Examine all targets on enabled taps.
foreach t $targets {
- if {[jtag tapisenabled [$t cget -chain-position]]} {
+ if {![using_jtag] || [jtag tapisenabled [$t cget -chain-position]]} {
$t invoke-event examine-start
set err [catch "$t arp_examine"]
if { $err == 0 } {
$t invoke-event examine-start
set err [catch "$t arp_examine"]
if { $err == 0 } {
}
foreach t $targets {
# C code needs to know if we expect to 'halt'
}
foreach t $targets {
# C code needs to know if we expect to 'halt'
- if {[jtag tapisenabled [$t cget -chain-position]]} {
+ if {![using_jtag] || [jtag tapisenabled [$t cget -chain-position]]} {
$t arp_reset assert $halt
}
}
$t arp_reset assert $halt
}
}
}
foreach t $targets {
# Again, de-assert code needs to know if we 'halt'
}
foreach t $targets {
# Again, de-assert code needs to know if we 'halt'
- if {[jtag tapisenabled [$t cget -chain-position]]} {
+ if {![using_jtag] || [jtag tapisenabled [$t cget -chain-position]]} {
$t arp_reset deassert $halt
}
}
$t arp_reset deassert $halt
}
}
# first executing any instructions.
if { $halt } {
foreach t $targets {
# first executing any instructions.
if { $halt } {
foreach t $targets {
- if {[jtag tapisenabled [$t cget -chain-position]] == 0} {
+ if {[using_jtag] && ![jtag tapisenabled [$t cget -chain-position]]} {
#Pass 2 - if needed "init"
if { 0 == [string compare init $MODE] } {
foreach t $targets {
#Pass 2 - if needed "init"
if { 0 == [string compare init $MODE] } {
foreach t $targets {
- if {[jtag tapisenabled [$t cget -chain-position]] == 0} {
+ if {[using_jtag] && ![jtag tapisenabled [$t cget -chain-position]]} {
+proc using_jtag {} {
+ set _TRANSPORT [ transport select ]
+ expr { [ string first "jtag" $_TRANSPORT ] != -1 }
+}
+
+proc using_swd {} {
+ set _TRANSPORT [ transport select ]
+ expr { [ string first "swd" $_TRANSPORT ] != -1 }
+}
+
+proc using_hla {} {
+ set _TRANSPORT [ transport select ]
+ expr { [ string first "hla" $_TRANSPORT ] != -1 }
+}
+
#########
# Temporary migration aid. May be removed starting in January 2011.
#########
# Temporary migration aid. May be removed starting in January 2011.
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 500
adapter_nsrst_delay 100
adapter_khz 500
adapter_nsrst_delay 100
adapter_khz 500
adapter_nsrst_delay 100
adapter_khz 500
adapter_nsrst_delay 100
# delays on reset lines
adapter_nsrst_delay 200
# delays on reset lines
adapter_nsrst_delay 200
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
set _BSTAPID9 0x06428041
}
set _BSTAPID9 0x06428041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2 -expected-id $_BSTAPID3 \
-expected-id $_BSTAPID4 -expected-id $_BSTAPID5 \
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
set _BSTAPID 0x06411041
}
set _BSTAPID 0x06411041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
}
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
set _BSTAPID2 0x06432041
}
set _BSTAPID2 0x06432041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 -expected-id $_BSTAPID2
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 -expected-id $_BSTAPID2
}
set _BSTAPID2 0x06419041
}
set _BSTAPID2 0x06419041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID1 \
-expected-id $_BSTAPID2
}
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 1000
adapter_nsrst_delay 100
adapter_khz 100
adapter_nsrst_delay 100
adapter_khz 100
adapter_nsrst_delay 100
set _BSTAPID 0x06416041
}
set _BSTAPID 0x06416041
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
}
jtag newtap $_CHIPNAME bs -irlen 5 -expected-id $_BSTAPID
}
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
if { [info exists BSTAPID] } {
set _BSTAPID $BSTAPID
jtag newtap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf -expected-id 0x269a862b
if { [info exists BSTAPID] } {
set _BSTAPID $BSTAPID
jtag newtap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf -expected-id 0x269a862b
# split out "chip" and "tag" so we can someday handle
# them more uniformly irlen too...)
# 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} {
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 }
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)