target: restructure dap support
[fw/openocd] / tcl / target / psoc5lp.cfg
index 1cdde4712e1af50ed93687c69686e15451bc91cd..230ca0732193548068e0ac0921c949d675a38e68 100644 (file)
@@ -23,9 +23,10 @@ if { [using_jtag] } {
 }
 
 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_DAP_ID
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 
 set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
+target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
 
 if {![using_hla]} {
        cortex_m reset_config sysresetreq