Allow transports to override the selected target (hla configs unification)
[fw/openocd] / tcl / target / swj-dp.tcl
index 2fa82ed376ced88c93e88d0ef40d4318342a0945..4f2b49692bb1582351e0ab23a38d22528aac4d2e 100644 (file)
@@ -24,7 +24,13 @@ if [catch {transport select}] {
 }
 
 proc swj_newdap {chip tag args} {
- 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 }
+ if [using_hla] {
+     eval hla newtap $chip $tag $args
+ } elseif [using_jtag] {
+     eval jtag newtap $chip $tag $args
+ } elseif [using_swd] {
+     eval swd newdap $chip $tag $args
+ } elseif [string equal [transport select] "cmsis-dap"] {
+     eval cmsis-dap newdap $chip $tag $args
+ }
 }