tcl/target: use command 'jtag newtap' to add a boundary scan TAP 73/4873/5
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 26 Jan 2019 15:19:55 +0000 (16:19 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 5 Sep 2020 16:10:14 +0000 (17:10 +0100)
A JTAG TAP for boundary scan should be added in the scan chain
through the command "jtag newtap".
In some TCL target script the boundary scan TAP is added through
the command "swj_newdap", command that is inappropriate in this
context because specific for arm adi-v5 SWJ-DP.
This situation was probably created to bypass the error with HLA
framework, caused by missing command "jtag newtap".

Add the command "jtag newtap" in HLA, by reusing the existing
code for command "hla newtap".
Fix the TCL target scripts to use the command "jtag newtap" for
the boundary scan TAPs.

The TCL script target/psoc6.cfg has no evident reference to HLA,
so the reason for using "swj_newdap" is less clear. Nevertheless
it uses the wrong command and, once HLA is fixed, there is no
reason to avoid fixing it too.

Change-Id: Ia92f8221430cf6f3d2c34294e22e5e18963bb88c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4873
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/jtag/hla/hla_transport.c
tcl/target/em357.cfg
tcl/target/psoc6.cfg
tcl/target/stm32h7x.cfg
tcl/target/stm32w108xx.cfg
tcl/target/stm32wlx.cfg

index fbdddfd651de724487688e3bdb36d986c70b0fc1..3383577481df8492d9c77f34a942850616f85409 100644 (file)
@@ -62,6 +62,9 @@ hl_transport_stlink_subcommand_handlers[] = {
 
 static const struct command_registration
 hl_transport_jtag_subcommand_handlers[] = {
+       {
+        .chain = hl_transport_stlink_subcommand_handlers,
+        },
        {
         .name = "init",
         .mode = COMMAND_ANY,
index 5720071343e51132fddec6689d6390b1db84fe49..f39f3f428090dd9620fdbc916a550ff3d0968a9c 100644 (file)
@@ -52,7 +52,7 @@ if { [info exists FLASHSIZE] } {
 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID
 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 if { [using_jtag] } {
-    swj_newdap $_CHIPNAME bs -irlen 4 -expected-id $_BSTAPID -ircapture 0xe -irmask 0xf
+    jtag newtap $_CHIPNAME bs -irlen 4 -expected-id $_BSTAPID -ircapture 0xe -irmask 0xf
 }
 
 set _TARGETNAME $_CHIPNAME.cpu
index 51d032b17c7363130b2f018cd84f52ccf3e3a0db..bf63fd5d43246d98e019798e5f52b490a370590c 100644 (file)
@@ -146,5 +146,5 @@ if { $_ENABLE_CM0 } {
 }
 
 if {[using_jtag]} {
-       swj_newdap $_CHIPNAME bs -irlen 18 -expected-id 0x2e200069
+       jtag newtap $_CHIPNAME bs -irlen 18 -expected-id 0x2e200069
 }
index 2d92eca92ba576a40341bf49cd3d1582ea0149fc..43a8b024e5a3ec49154edb31d6b25c848202058a 100644 (file)
@@ -70,7 +70,7 @@ swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPU
 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 
 if {[using_jtag]} {
swj_newdap $_CHIPNAME bs -irlen 5
  jtag newtap $_CHIPNAME bs -irlen 5
 }
 
 if {![using_hla]} {
index 3a83fd19eedf963cef792c4fe1eac819264d86f8..0470bf6ce8f1f71ce1c78bd957a0e79f35c28fb1 100644 (file)
@@ -42,11 +42,11 @@ dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 if {[using_jtag]} {
  if { [info exists BSTAPID] } {
    set _BSTAPID $BSTAPID
-   swj_newdap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf -expected-id _BSTAPID
+   jtag newtap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf -expected-id _BSTAPID
  } else {
    set _BSTAPID_1 0x169a862b
    set _BSTAPID_2 0x269a862b
-   swj_newdap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf \
+   jtag newtap $_CHIPNAME bs -irlen 4 -ircapture 0xe -irmask 0xf \
                -expected-id $_BSTAPID_1 -expected-id $_BSTAPID_2
  }
 }
index 98c9a7ee911e37e9d4b9070a6c937049da22a6ba..ba16fab6b2d7db3c6b907928872f95401a9b070a 100644 (file)
@@ -38,7 +38,7 @@ swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPU
 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 
 if {[using_jtag]} {
-       swj_newdap $_CHIPNAME bs -irlen 5
+       jtag newtap $_CHIPNAME bs -irlen 5
 }
 
 set _TARGETNAME $_CHIPNAME.cpu

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)