Allow transports to override the selected target (hla configs unification)
[fw/openocd] / tcl / target / 1986ве1т.cfg
index c76a211136ef7f8a94a2c8f1d602d00523cc054a..7b0c35f08f38d558ff185f0ec7f43a127e169b07 100644 (file)
@@ -26,8 +26,12 @@ if { [info exists WORKAREASIZE] } {
 if { [info exists CPUTAPID] } {
    set _CPUTAPID $CPUTAPID
 } else {
-   set _CPUTAPID 0x4ba00477
-   # SWD IDCODE 0x2ba01477
+   if { [using_jtag] } {
+      set _CPUTAPID 0x4ba00477
+   } {
+      # SWD IDCODE
+      set _CPUTAPID 0x2ba01477
+   }
 }
 swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
 
@@ -52,6 +56,8 @@ if {[using_jtag]} {
    jtag_ntrst_delay 100
 }
 
-# if srst is not fitted use SYSRESETREQ to
-# perform a soft reset
-cortex_m reset_config sysresetreq
+if {![using_hla]} {
+   # if srst is not fitted use SYSRESETREQ to
+   # perform a soft reset
+   cortex_m reset_config sysresetreq
+}