target/imx6ul: Initial support
[fw/openocd] / tcl / target / xmc4xxx.cfg
index 34f0327fdeb6604990eec012eb1f241fceb54c5b..e106d34e3bde7e421945b4ed6f8e03f32bd36a99 100644 (file)
@@ -35,9 +35,23 @@ 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
+if { [info exists WORKAREASIZE] } {
+   set _WORKAREASIZE $WORKAREASIZE
+} else {
+   set _WORKAREASIZE 0x1000
+}
+
+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
+
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME xmc4xxx 0x0C000000 0 0 0 $_TARGETNAME
 
 if { ![using_hla] } {
        cortex_m reset_config sysresetreq