cfg: add pic32 virtual banks
[fw/openocd] / tcl / board / digi_connectcore_wi-9c.cfg
index 3bc26adf8a7b2be0640d86dd026fa256604ecd7a..096af1b66d67c05e823b3effb836e1d8d1153f0b 100644 (file)
@@ -4,6 +4,10 @@
 
 reset_config trst_and_srst
 
+# FIXME use some standard target config, maybe create one from this
+#
+#      source [find target/...cfg]
+
 if { [info exists CHIPNAME] } {
    set  _CHIPNAME $CHIPNAME
 } else {
@@ -29,10 +33,10 @@ if { [info exists CPUTAPID ] } {
    set _CPUTAPID 0x07926031
 }
 
-set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
+set _TARGETNAME $_CHIPNAME.cpu
 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
 
-jtag_nsrst_delay 200
+adapter_nsrst_delay 200
 jtag_ntrst_delay 0
 
 
@@ -40,7 +44,7 @@ jtag_ntrst_delay 0
 # Target configuration
 ######################
 
-target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm926ejs
+target create $_TARGETNAME arm926ejs -endian $_ENDIAN -chain-position $_TARGETNAME
 
 $_TARGETNAME configure -event reset-init {
        mww 0x90600104 0x33313333
@@ -121,6 +125,6 @@ $_TARGETNAME configure -work-area-phys 0x00000000 -work-area-size 0x1000 -work-a
 #####################
 
 #M29DW323DB - not working
-#flash bank cfi <base> <size> <chip width> <bus width> <target#>
+#flash bank <name> cfi <base> <size> <chip width> <bus width> <target>
 set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME cfi 0x50000000 0x0400000 2 2 0
+flash bank $_FLASHNAME cfi 0x50000000 0x0400000 2 2 $_TARGETNAME