target: restructure dap support
[fw/openocd] / tcl / target / xmc4xxx.cfg
index bc007779977f3bd516720a8bd9ae3bcfcb655c8a..e106d34e3bde7e421945b4ed6f8e03f32bd36a99 100644 (file)
@@ -35,9 +35,10 @@ if { [using_jtag] } {
 }
 
 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_TAPID
+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
 
 # Work-area is a space in RAM used for flash programming
 # By default use 16 kB