summaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-18 02:15:52 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-19 13:39:41 -0800
commit2dfa5e9c844a5a3f8aaca146c874f13570b8f667 (patch)
tree30178e8d65d17c173619a3a8b9921b8d4f911210 /tcl
parentfd654c8a3e3dbd5ab97eb6b3834ee462dd509a66 (diff)
downloadopenocd_libswd-2dfa5e9c844a5a3f8aaca146c874f13570b8f667.tar.gz
openocd_libswd-2dfa5e9c844a5a3f8aaca146c874f13570b8f667.tar.bz2
openocd_libswd-2dfa5e9c844a5a3f8aaca146c874f13570b8f667.tar.xz
openocd_libswd-2dfa5e9c844a5a3f8aaca146c874f13570b8f667.zip
update 'flash bank' usage in scripts
Sets $_FLASHNAME to "$_CHIPNAME.flash" and passes it as the first argument to 'flash bank'.
Diffstat (limited to 'tcl')
-rw-r--r--tcl/board/balloon3-cpu.cfg3
-rw-r--r--tcl/board/crossbow_tech_imote2.cfg3
-rw-r--r--tcl/board/csb337.cfg3
-rw-r--r--tcl/board/digi_connectcore_wi-9c.cfg3
-rw-r--r--tcl/board/hammer.cfg3
-rw-r--r--tcl/board/hitex_lpc2929.cfg3
-rw-r--r--tcl/board/hitex_str9-comstick.cfg6
-rw-r--r--tcl/board/lubbock.cfg6
-rw-r--r--tcl/board/omap2420_h4.cfg6
-rw-r--r--tcl/board/osk5912.cfg6
-rw-r--r--tcl/board/pxa255_sst.cfg3
-rw-r--r--tcl/board/str910-eval.cfg6
-rw-r--r--tcl/board/telo.cfg3
-rw-r--r--tcl/board/topas910.cfg3
-rw-r--r--tcl/board/topasa900.cfg3
-rw-r--r--tcl/board/unknown_at91sam9260.cfg3
-rw-r--r--tcl/board/x300t.cfg3
-rw-r--r--tcl/board/zy1000.cfg3
-rw-r--r--tcl/target/aduc702x.cfg3
-rw-r--r--tcl/target/at91eb40a.cfg3
-rw-r--r--tcl/target/at91r40008.cfg3
-rw-r--r--tcl/target/at91sam3u1c.cfg3
-rw-r--r--tcl/target/at91sam3u1e.cfg3
-rw-r--r--tcl/target/at91sam3u2c.cfg3
-rw-r--r--tcl/target/at91sam3u2e.cfg3
-rw-r--r--tcl/target/at91sam3u4c.cfg6
-rw-r--r--tcl/target/at91sam3u4e.cfg6
-rw-r--r--tcl/target/at91sam7sx.cfg3
-rw-r--r--tcl/target/at91sam9260_ext_RAM_ext_flash.cfg3
-rw-r--r--tcl/target/epc9301.cfg3
-rw-r--r--tcl/target/faux.cfg3
-rw-r--r--tcl/target/lm3s1968.cfg3
-rw-r--r--tcl/target/lm3s3748.cfg3
-rw-r--r--tcl/target/lm3s6965.cfg3
-rw-r--r--tcl/target/lm3s811.cfg3
-rw-r--r--tcl/target/lm3s9b9x.cfg3
-rw-r--r--tcl/target/lpc1768.cfg3
-rw-r--r--tcl/target/lpc2103.cfg3
-rw-r--r--tcl/target/lpc2124.cfg3
-rw-r--r--tcl/target/lpc2129.cfg3
-rw-r--r--tcl/target/lpc2148.cfg3
-rw-r--r--tcl/target/lpc2294.cfg3
-rw-r--r--tcl/target/lpc2378.cfg3
-rw-r--r--tcl/target/lpc2478.cfg3
-rw-r--r--tcl/target/lpc2900.cfg3
-rw-r--r--tcl/target/mega128.cfg3
-rw-r--r--tcl/target/pic32mx.cfg6
-rw-r--r--tcl/target/sam7se512.cfg3
-rw-r--r--tcl/target/sam7x256.cfg3
-rw-r--r--tcl/target/smdk6410.cfg3
-rw-r--r--tcl/target/stm32.cfg3
-rw-r--r--tcl/target/str710.cfg6
-rw-r--r--tcl/target/str730.cfg3
-rw-r--r--tcl/target/str750.cfg6
-rw-r--r--tcl/target/str912.cfg6
-rw-r--r--tcl/target/telo.cfg3
-rw-r--r--tcl/target/xba_revA3.cfg3
-rw-r--r--tcl/test/syntax1.cfg3
58 files changed, 138 insertions, 69 deletions
diff --git a/tcl/board/balloon3-cpu.cfg b/tcl/board/balloon3-cpu.cfg
index 8a646b76..ecb1a282 100644
--- a/tcl/board/balloon3-cpu.cfg
+++ b/tcl/board/balloon3-cpu.cfg
@@ -10,4 +10,5 @@ reset_config trst_and_srst separate
# flash bank <driver> <base> <size> <chip_width> <bus_width>
# 29LV650 64Mbit Flash
-flash bank cfi 0x00000000 0x800000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x800000 2 2 0
diff --git a/tcl/board/crossbow_tech_imote2.cfg b/tcl/board/crossbow_tech_imote2.cfg
index a7d12156..88d4aa72 100644
--- a/tcl/board/crossbow_tech_imote2.cfg
+++ b/tcl/board/crossbow_tech_imote2.cfg
@@ -9,4 +9,5 @@ jtag_nsrst_delay 800
reset_config trst_and_srst separate
# works for P30 flash
-flash bank cfi 0x00000000 0x2000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x2000000 2 2 $_TARGETNAME
diff --git a/tcl/board/csb337.cfg b/tcl/board/csb337.cfg
index c2c47898..de196604 100644
--- a/tcl/board/csb337.cfg
+++ b/tcl/board/csb337.cfg
@@ -4,7 +4,8 @@
source [find target/at91rm9200.cfg]
# boots from NOR on CS0: 8 MBytes CFI flash, 16-bit bus
-flash bank cfi 0x10000000 0x00800000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x10000000 0x00800000 2 2 $_TARGETNAME
# ETM9 trace port connector present on this board, 16 data pins.
if { [info exists ETM_DRIVER] } {
diff --git a/tcl/board/digi_connectcore_wi-9c.cfg b/tcl/board/digi_connectcore_wi-9c.cfg
index e6d17bdd..3bc26adf 100644
--- a/tcl/board/digi_connectcore_wi-9c.cfg
+++ b/tcl/board/digi_connectcore_wi-9c.cfg
@@ -122,4 +122,5 @@ $_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 cfi 0x50000000 0x0400000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x50000000 0x0400000 2 2 0
diff --git a/tcl/board/hammer.cfg b/tcl/board/hammer.cfg
index ed83803f..d366a45e 100644
--- a/tcl/board/hammer.cfg
+++ b/tcl/board/hammer.cfg
@@ -33,4 +33,5 @@ $_TARGETNAME configure -event reset-init {
#flash configuration
#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
-flash bank cfi 0x00000000 0x1000000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x1000000 2 2 0
diff --git a/tcl/board/hitex_lpc2929.cfg b/tcl/board/hitex_lpc2929.cfg
index d0b28647..7d06f745 100644
--- a/tcl/board/hitex_lpc2929.cfg
+++ b/tcl/board/hitex_lpc2929.cfg
@@ -28,7 +28,8 @@ $_TARGETNAME configure -event reset-start {
}
# External 16-bit flash at chip select CS7 (SST39VF3201-70, 4 MiB)
-flash bank cfi 0x5C000000 0x400000 2 2 $_TARGETNAME jedec_probe
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x5C000000 0x400000 2 2 $_TARGETNAME jedec_probe
$_TARGETNAME configure -event reset-init {
diff --git a/tcl/board/hitex_str9-comstick.cfg b/tcl/board/hitex_str9-comstick.cfg
index e7b79616..968d80ec 100644
--- a/tcl/board/hitex_str9-comstick.cfg
+++ b/tcl/board/hitex_str9-comstick.cfg
@@ -68,5 +68,7 @@ $_TARGETNAME configure -event reset-init {
$_TARGETNAME configure -work-area-phys 0x50000000 -work-area-size 16384 -work-area-backup 0
#flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash bank str9x 0x00000000 0x00080000 0 0 0
-flash bank str9x 0x00080000 0x00008000 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 0
diff --git a/tcl/board/lubbock.cfg b/tcl/board/lubbock.cfg
index 63cc2a41..32af386e 100644
--- a/tcl/board/lubbock.cfg
+++ b/tcl/board/lubbock.cfg
@@ -12,8 +12,10 @@ jtag_ntrst_delay 250
# CS0, CS1 -- two banks of CFI flash, 32 MBytes each
# each bank is 32-bits wide, two 16-bit chips in parallel
-flash bank cfi 0x00000000 0x02000000 2 4 $_TARGETNAME
-flash bank cfi 0x04000000 0x02000000 2 4 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x02000000 2 4 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x04000000 0x02000000 2 4 $_TARGETNAME
# CS2 low -- FPGA registers
# CS2 high -- 1 MByte SRAM at 0x0a00.0000 ... last 64K for scratch
diff --git a/tcl/board/omap2420_h4.cfg b/tcl/board/omap2420_h4.cfg
index c2190b5c..12efa053 100644
--- a/tcl/board/omap2420_h4.cfg
+++ b/tcl/board/omap2420_h4.cfg
@@ -8,5 +8,7 @@ reset_config trst_and_srst separate
# Board configs can vary a *LOT* ... parts, jumpers, etc.
# This GP board boots from cs0 using NOR (2x32M), and also
# has 64M NAND on cs6.
-flash bank cfi 0x04000000 0x02000000 2 2 $_TARGETNAME
-flash bank cfi 0x06000000 0x02000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x04000000 0x02000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x06000000 0x02000000 2 2 $_TARGETNAME
diff --git a/tcl/board/osk5912.cfg b/tcl/board/osk5912.cfg
index d78c6eff..c33ae285 100644
--- a/tcl/board/osk5912.cfg
+++ b/tcl/board/osk5912.cfg
@@ -19,8 +19,10 @@ etm_dummy config $_TARGETNAME
# standard boards populate two 16 MB chips, but manufacturing
# options or an expansion board could change this config.
-flash bank cfi 0x00000000 0x01000000 2 2 $_TARGETNAME
-flash bank cfi 0x01000000 0x01000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x01000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x01000000 0x01000000 2 2 $_TARGETNAME
proc osk5912_init {} {
omap5912_reset
diff --git a/tcl/board/pxa255_sst.cfg b/tcl/board/pxa255_sst.cfg
index 8bc691ba..ce903871 100644
--- a/tcl/board/pxa255_sst.cfg
+++ b/tcl/board/pxa255_sst.cfg
@@ -13,7 +13,8 @@ source [find target/pxa255.cfg]
$_TARGETNAME configure -work-area-phys 0x4000000 -work-area-size 0x4000 -work-area-backup 0
# flash bank <driver> <base> <size> <chip_width> <bus_width> <target> [options]
-flash bank cfi 0x00000000 0x80000 2 2 $_TARGETNAME jedec_probe
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x80000 2 2 $_TARGETNAME jedec_probe
proc pxa255_sst_init {} {
xscale cp15 15 0x00002001 #Enable CP0 and CP13 access
diff --git a/tcl/board/str910-eval.cfg b/tcl/board/str910-eval.cfg
index fa872a9b..0cf794ae 100644
--- a/tcl/board/str910-eval.cfg
+++ b/tcl/board/str910-eval.cfg
@@ -54,8 +54,10 @@ $_TARGETNAME configure -event reset-init {
}
#flash bank str9x <base> <size> 0 0 <target#> <variant>
-flash bank str9x 0x00000000 0x00080000 0 0 0
-flash bank str9x 0x00080000 0x00008000 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 0
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/board/telo.cfg b/tcl/board/telo.cfg
index c4e5d67f..0cbdb816 100644
--- a/tcl/board/telo.cfg
+++ b/tcl/board/telo.cfg
@@ -54,7 +54,8 @@ proc srst_deasserted {} { puts "Sensed nSRST deasserted. No action." }
# boots from NOR on CS0: 8 MBytes CFI flash, 16-bit bus
# it's really 16MB but the upper 8mb is controller via gpio
# openocd does not support 'complex reads/writes' to NOR
-flash bank cfi 0x20000000 0x01000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x20000000 0x01000000 2 2 $_TARGETNAME
# writing data to memory does not work without this
memwrite burst disable \ No newline at end of file
diff --git a/tcl/board/topas910.cfg b/tcl/board/topas910.cfg
index ce7c87a4..ae72c4b7 100644
--- a/tcl/board/topas910.cfg
+++ b/tcl/board/topas910.cfg
@@ -115,4 +115,5 @@ arm7_9 dcc_downloads enable # Enable faster DCC downloads
#####################
#flash bank cfi <base> <size> <chip width> <bus width> <target#>
-flash bank cfi 0x20000000 0x2000000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x20000000 0x2000000 2 2 0
diff --git a/tcl/board/topasa900.cfg b/tcl/board/topasa900.cfg
index a8a6caf6..5984f81f 100644
--- a/tcl/board/topasa900.cfg
+++ b/tcl/board/topasa900.cfg
@@ -121,5 +121,6 @@ arm7_9 dcc_downloads enable # Enable faster DCC downloads
#####################
#flash bank cfi <base> <size> <chip width> <bus width> <target#>
-flash bank cfi 0x20000000 0x1000000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x20000000 0x1000000 2 2 0
diff --git a/tcl/board/unknown_at91sam9260.cfg b/tcl/board/unknown_at91sam9260.cfg
index 2abd367f..ad7b13c7 100644
--- a/tcl/board/unknown_at91sam9260.cfg
+++ b/tcl/board/unknown_at91sam9260.cfg
@@ -91,6 +91,7 @@ $_TARGETNAME configure -event reset-init {
#####################
#flash bank cfi <base> <size> <chip width> <bus width> <target#>
-flash bank cfi 0x10000000 0x01000000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x10000000 0x01000000 2 2 0
diff --git a/tcl/board/x300t.cfg b/tcl/board/x300t.cfg
index 3b094930..d9141809 100644
--- a/tcl/board/x300t.cfg
+++ b/tcl/board/x300t.cfg
@@ -8,7 +8,8 @@ $_TARGETNAME configure -event reset-init { x300t_init }
# 1MB CFI capable flash
# flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash bank cfi 0xac000000 0x100000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0xac000000 0x100000 2 2 0
proc x300t_init { } {
# Setup SDRAM config and flash mapping
diff --git a/tcl/board/zy1000.cfg b/tcl/board/zy1000.cfg
index 54bb7bb7..3f526d06 100644
--- a/tcl/board/zy1000.cfg
+++ b/tcl/board/zy1000.cfg
@@ -38,7 +38,8 @@ target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAM
arm7_9 fast_memory_access enable
arm7_9 dcc_downloads enable
-flash bank ecosflash 0x01000000 0x200000 2 2 $_TARGETNAME ecos/at91eb40a.elf
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME ecosflash 0x01000000 0x200000 2 2 $_TARGETNAME ecos/at91eb40a.elf
$_TARGETNAME configure -event reset-init {
# Set up chip selects & timings
mww 0xFFE00000 0x0100273D
diff --git a/tcl/target/aduc702x.cfg b/tcl/target/aduc702x.cfg
index b60c9679..58cc9b98 100644
--- a/tcl/target/aduc702x.cfg
+++ b/tcl/target/aduc702x.cfg
@@ -35,7 +35,8 @@ $_TARGETNAME configure -work-area-phys 0x10000 -work-area-size 0x2000
## flash configuration
# only target number is needed
-flash bank aduc702x 0 0 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME aduc702x 0 0 0 0 0
## If you use the watchdog, the following code makes sure that the board
## doesn't reboot when halted via JTAG. Yes, on the older generation
diff --git a/tcl/target/at91eb40a.cfg b/tcl/target/at91eb40a.cfg
index 8b3a9ec1..e78cceac 100644
--- a/tcl/target/at91eb40a.cfg
+++ b/tcl/target/at91eb40a.cfg
@@ -42,7 +42,8 @@ arm7_9 fast_memory_access enable
arm7_9 dcc_downloads enable
#flash driver
-flash bank ecosflash 0x01000000 0x200000 2 2 0 ecos/at91eb40a.elf
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME ecosflash 0x01000000 0x200000 2 2 0 ecos/at91eb40a.elf
# required for usable performance. Used for lots of
# other things than flash programming.
diff --git a/tcl/target/at91r40008.cfg b/tcl/target/at91r40008.cfg
index e8710f7f..9069ae56 100644
--- a/tcl/target/at91r40008.cfg
+++ b/tcl/target/at91r40008.cfg
@@ -45,7 +45,8 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
$_TARGETNAME configure -work-area-phys 0x3C000 -work-area-size 0x4000 -work-area-backup 0
-flash bank cfi 0x10000000 0x400000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x10000000 0x400000 2 2 $_TARGETNAME
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/at91sam3u1c.cfg b/tcl/target/at91sam3u1c.cfg
index d338f305..47c227b2 100644
--- a/tcl/target/at91sam3u1c.cfg
+++ b/tcl/target/at91sam3u1c.cfg
@@ -2,6 +2,7 @@
source [find target/at91sam3uxx.cfg]
# size is automatically "calculated" by probing
-flash bank at91sam3 0x000080000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000080000 0 1 1 $_TARGETNAME
diff --git a/tcl/target/at91sam3u1e.cfg b/tcl/target/at91sam3u1e.cfg
index d338f305..47c227b2 100644
--- a/tcl/target/at91sam3u1e.cfg
+++ b/tcl/target/at91sam3u1e.cfg
@@ -2,6 +2,7 @@
source [find target/at91sam3uxx.cfg]
# size is automatically "calculated" by probing
-flash bank at91sam3 0x000080000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000080000 0 1 1 $_TARGETNAME
diff --git a/tcl/target/at91sam3u2c.cfg b/tcl/target/at91sam3u2c.cfg
index d338f305..47c227b2 100644
--- a/tcl/target/at91sam3u2c.cfg
+++ b/tcl/target/at91sam3u2c.cfg
@@ -2,6 +2,7 @@
source [find target/at91sam3uxx.cfg]
# size is automatically "calculated" by probing
-flash bank at91sam3 0x000080000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000080000 0 1 1 $_TARGETNAME
diff --git a/tcl/target/at91sam3u2e.cfg b/tcl/target/at91sam3u2e.cfg
index d338f305..47c227b2 100644
--- a/tcl/target/at91sam3u2e.cfg
+++ b/tcl/target/at91sam3u2e.cfg
@@ -2,6 +2,7 @@
source [find target/at91sam3uxx.cfg]
# size is automatically "calculated" by probing
-flash bank at91sam3 0x000080000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000080000 0 1 1 $_TARGETNAME
diff --git a/tcl/target/at91sam3u4c.cfg b/tcl/target/at91sam3u4c.cfg
index e8fdabab..e2812870 100644
--- a/tcl/target/at91sam3u4c.cfg
+++ b/tcl/target/at91sam3u4c.cfg
@@ -2,8 +2,10 @@
source [find target/at91sam3uxx.cfg]
# size is automatically "calculated" by probing
-flash bank at91sam3 0x000080000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000080000 0 1 1 $_TARGETNAME
# This is a 256K chip, it has the 2nd bank
-flash bank at91sam3 0x000100000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000100000 0 1 1 $_TARGETNAME
diff --git a/tcl/target/at91sam3u4e.cfg b/tcl/target/at91sam3u4e.cfg
index 9477ad00..242b53ee 100644
--- a/tcl/target/at91sam3u4e.cfg
+++ b/tcl/target/at91sam3u4e.cfg
@@ -2,8 +2,10 @@
source [find target/at91sam3uxx.cfg]
# size is automatically "calculated" by probing
-flash bank at91sam3 0x000080000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000080000 0 1 1 $_TARGETNAME
# This is a 256K chip - it has the 2nd bank
-flash bank at91sam3 0x000100000 0 1 1 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam3 0x000100000 0 1 1 $_TARGETNAME
diff --git a/tcl/target/at91sam7sx.cfg b/tcl/target/at91sam7sx.cfg
index 2a7f90c5..f3cc88e9 100644
--- a/tcl/target/at91sam7sx.cfg
+++ b/tcl/target/at91sam7sx.cfg
@@ -49,7 +49,8 @@ $_TARGETNAME configure -event reset-init {
$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
-flash bank at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/at91sam9260_ext_RAM_ext_flash.cfg b/tcl/target/at91sam9260_ext_RAM_ext_flash.cfg
index de7e9ab2..690406bb 100644
--- a/tcl/target/at91sam9260_ext_RAM_ext_flash.cfg
+++ b/tcl/target/at91sam9260_ext_RAM_ext_flash.cfg
@@ -55,7 +55,8 @@ $_TARGETNAME configure -event reset-deassert-post {at91sam_init}
# Flash configuration
#flash bank cfi <base> <size> <chip width> <bus width> <target#>
-flash bank cfi 0x10000000 0x01000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x10000000 0x01000000 2 2 $_TARGETNAME
proc at91sam_init { } {
diff --git a/tcl/target/epc9301.cfg b/tcl/target/epc9301.cfg
index eaf4ee96..7e4599da 100644
--- a/tcl/target/epc9301.cfg
+++ b/tcl/target/epc9301.cfg
@@ -28,4 +28,5 @@ target create $_TARGETNAME arm920t -endian $_ENDIAN -chain-position $_TARGETNAME
#flash configuration
#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
-flash bank cfi 0x60000000 0x1000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x60000000 0x1000000 2 2 $_TARGETNAME
diff --git a/tcl/target/faux.cfg b/tcl/target/faux.cfg
index cc09ee31..6fe0cd79 100644
--- a/tcl/target/faux.cfg
+++ b/tcl/target/faux.cfg
@@ -26,4 +26,5 @@ set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
#dummy flash driver
-flash bank faux 0x01000000 0x200000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME faux 0x01000000 0x200000 2 2 0
diff --git a/tcl/target/lm3s1968.cfg b/tcl/target/lm3s1968.cfg
index e54bbfe5..330bb56a 100644
--- a/tcl/target/lm3s1968.cfg
+++ b/tcl/target/lm3s1968.cfg
@@ -25,4 +25,5 @@ target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x2000
#flash configuration
-flash bank stellaris 0 0 0 0 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME stellaris 0 0 0 0 $_TARGETNAME
diff --git a/tcl/target/lm3s3748.cfg b/tcl/target/lm3s3748.cfg
index 5317a6d9..274377a7 100644
--- a/tcl/target/lm3s3748.cfg
+++ b/tcl/target/lm3s3748.cfg
@@ -25,4 +25,5 @@ target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x2000
# flash configuration -- one bank of 128K
-flash bank stellaris 0 0 0 0 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME stellaris 0 0 0 0 $_TARGETNAME
diff --git a/tcl/target/lm3s6965.cfg b/tcl/target/lm3s6965.cfg
index f0eb6b0d..02d85d46 100644
--- a/tcl/target/lm3s6965.cfg
+++ b/tcl/target/lm3s6965.cfg
@@ -34,4 +34,5 @@ target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x2000
#flash configuration
-flash bank stellaris 0 0 0 0 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME stellaris 0 0 0 0 $_TARGETNAME
diff --git a/tcl/target/lm3s811.cfg b/tcl/target/lm3s811.cfg
index 82106961..49879d09 100644
--- a/tcl/target/lm3s811.cfg
+++ b/tcl/target/lm3s811.cfg
@@ -25,4 +25,5 @@ target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x2000
#flash configuration
-flash bank stellaris 0 0 0 0 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME stellaris 0 0 0 0 $_TARGETNAME
diff --git a/tcl/target/lm3s9b9x.cfg b/tcl/target/lm3s9b9x.cfg
index e822bb28..a727251f 100644
--- a/tcl/target/lm3s9b9x.cfg
+++ b/tcl/target/lm3s9b9x.cfg
@@ -29,4 +29,5 @@ target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x4000
#flash configuration
-flash bank stellaris 0 0 0 0 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME stellaris 0 0 0 0 $_TARGETNAME
diff --git a/tcl/target/lpc1768.cfg b/tcl/target/lpc1768.cfg
index 0b07d51f..9a813f5b 100644
--- a/tcl/target/lpc1768.cfg
+++ b/tcl/target/lpc1768.cfg
@@ -44,7 +44,8 @@ $_TARGETNAME configure -event reset-init {
# LPC1768 has 512kB of user-available FLASH (bootloader is located in separate dedicated region).
# flash bank lpc1700 <base> <size> 0 0 <target#> <variant> <cclk> [calc_checksum]
-flash bank lpc2000 0x0 0x80000 0 0 $_TARGETNAME lpc1700 12000 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x80000 0 0 $_TARGETNAME lpc1700 12000 calc_checksum
# 4MHz / 6 = 666kHz, so use 500
jtag_khz 500
diff --git a/tcl/target/lpc2103.cfg b/tcl/target/lpc2103.cfg
index 0aadee8e..13535f59 100644
--- a/tcl/target/lpc2103.cfg
+++ b/tcl/target/lpc2103.cfg
@@ -35,4 +35,5 @@ $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x2000 -work-a
# 32kB of internal Flash, core clocked with 12MHz crystal
# flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc_checksum]
-flash bank lpc2000 0x0 0x8000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x8000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum
diff --git a/tcl/target/lpc2124.cfg b/tcl/target/lpc2124.cfg
index 471286b8..9a27aece 100644
--- a/tcl/target/lpc2124.cfg
+++ b/tcl/target/lpc2124.cfg
@@ -39,4 +39,5 @@ $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-a
#flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash bank lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14745 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14745 calc_checksum
diff --git a/tcl/target/lpc2129.cfg b/tcl/target/lpc2129.cfg
index a686a471..287fa5d0 100644
--- a/tcl/target/lpc2129.cfg
+++ b/tcl/target/lpc2129.cfg
@@ -38,4 +38,5 @@ target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAM
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash bank lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum
diff --git a/tcl/target/lpc2148.cfg b/tcl/target/lpc2148.cfg
index 1f833e72..cf6287c6 100644
--- a/tcl/target/lpc2148.cfg
+++ b/tcl/target/lpc2148.cfg
@@ -52,4 +52,5 @@ $_TARGETNAME configure -event reset-init {
}
# flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc_checksum]
-flash bank lpc2000 0x0 0x7d000 0 0 $_TARGETNAME lpc2000_v2 14765 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x7d000 0 0 $_TARGETNAME lpc2000_v2 14765 calc_checksum
diff --git a/tcl/target/lpc2294.cfg b/tcl/target/lpc2294.cfg
index a34940ed..d43d740b 100644
--- a/tcl/target/lpc2294.cfg
+++ b/tcl/target/lpc2294.cfg
@@ -32,7 +32,8 @@ $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-a
#flash configuration
#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
-flash bank lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/lpc2378.cfg b/tcl/target/lpc2378.cfg
index aa3fad26..4e50ac5c 100644
--- a/tcl/target/lpc2378.cfg
+++ b/tcl/target/lpc2378.cfg
@@ -43,7 +43,8 @@ $_TARGETNAME configure -event reset-init {
# LPC2378 has 512kB of FLASH, but upper 8kB are occupied by bootloader.
# After reset the chip uses its internal 4MHz RC oscillator
#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
-flash bank lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x0007D000 0 0 $_TARGETNAME lpc2000_v2 4000 calc_checksum
# 4MHz / 6 = 666kHz, so use 500
jtag_khz 500
diff --git a/tcl/target/lpc2478.cfg b/tcl/target/lpc2478.cfg
index b0af4c02..d0bff1ae 100644
--- a/tcl/target/lpc2478.cfg
+++ b/tcl/target/lpc2478.cfg
@@ -43,7 +43,8 @@ $_TARGETNAME configure -event reset-init {
# LPC2378 has 512kB of FLASH, but upper 8kB are occupied by bootloader.
# After reset the chip uses its internal 4MHz RC oscillator.
# flash bank lpc2000 <base> <size> 0 0 <target#> <variant> <clock> [calc checksum]
-flash bank lpc2000 0x0 0x7D000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x7D000 0 0 $_TARGETNAME lpc2000_v2 12000 calc_checksum
# Try to use RCLK, if RCLK is not available use "normal" mode. 4MHz / 6 = 666kHz, so use 500.
jtag_rclk 500
diff --git a/tcl/target/lpc2900.cfg b/tcl/target/lpc2900.cfg
index fa5bd5bb..2371dd7a 100644
--- a/tcl/target/lpc2900.cfg
+++ b/tcl/target/lpc2900.cfg
@@ -62,4 +62,5 @@ arm7_9 dcc_downloads enable
# Flash bank configuration:
# Flash: flash bank lpc2900 0 0 0 0 <target#> <flash clock (CLK_SYS_FMC) in kHz>
# Flash base address, total flash size, and number of sectors are all configured automatically.
-flash bank lpc2900 0 0 0 0 $_TARGETNAME $FLASH_CLOCK
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2900 0 0 0 0 $_TARGETNAME $FLASH_CLOCK
diff --git a/tcl/target/mega128.cfg b/tcl/target/mega128.cfg
index e444889e..2bc22949 100644
--- a/tcl/target/mega128.cfg
+++ b/tcl/target/mega128.cfg
@@ -22,7 +22,8 @@ target create $_TARGETNAME avr -endian $_ENDIAN -chain-position $_TARGETNAME
#$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
-flash bank avr 0 0 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME avr 0 0 0 0 0
#to use it, script will be like:
#init
diff --git a/tcl/target/pic32mx.cfg b/tcl/target/pic32mx.cfg
index 6127a540..a346c471 100644
--- a/tcl/target/pic32mx.cfg
+++ b/tcl/target/pic32mx.cfg
@@ -33,8 +33,10 @@ target create $_TARGETNAME mips_m4k -endian $_ENDIAN -chain-position $_TARGETNAM
$_TARGETNAME configure -work-area-phys 0xa0000000 -work-area-size 16384 -work-area-backup 0
-flash bank pic32mx 0xbd000000 0 0 0 0
-flash bank pic32mx 0xbfc00000 0 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME pic32mx 0xbd000000 0 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME pic32mx 0xbfc00000 0 0 0 0
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/sam7se512.cfg b/tcl/target/sam7se512.cfg
index 0f1e4126..d2550678 100644
--- a/tcl/target/sam7se512.cfg
+++ b/tcl/target/sam7se512.cfg
@@ -35,5 +35,6 @@ target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAM
$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
-flash bank at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
diff --git a/tcl/target/sam7x256.cfg b/tcl/target/sam7x256.cfg
index c3f7cd9c..5bab6421 100644
--- a/tcl/target/sam7x256.cfg
+++ b/tcl/target/sam7x256.cfg
@@ -46,7 +46,8 @@ $_TARGETNAME configure -event reset-init {
$_TARGETNAME configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base_addr> <size> <chip_width> <bus_width> <target_number> [<target_name> <banks> <sectors_per_bank> <pages_per_sector> <page_size> <num_nvmbits> <ext_freq_khz>]
-flash bank at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME at91sam7 0 0 0 0 0 0 0 0 0 0 0 0 18432
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/smdk6410.cfg b/tcl/target/smdk6410.cfg
index 7f15f8b8..dd8bf87a 100644
--- a/tcl/target/smdk6410.cfg
+++ b/tcl/target/smdk6410.cfg
@@ -5,4 +5,5 @@
source [find target/samsung_s3c6410.cfg]
-flash bank cfi 0x00000000 0x00100000 2 2 $_TARGETNAME jedec_probe
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x00000000 0x00100000 2 2 $_TARGETNAME jedec_probe
diff --git a/tcl/target/stm32.cfg b/tcl/target/stm32.cfg
index 242bbbee..463a85cf 100644
--- a/tcl/target/stm32.cfg
+++ b/tcl/target/stm32.cfg
@@ -62,7 +62,8 @@ target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNA
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
-flash bank stm32x 0 0 0 0 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME stm32x 0 0 0 0 $_TARGETNAME
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/str710.cfg b/tcl/target/str710.cfg
index 8e5d36f0..395a26cd 100644
--- a/tcl/target/str710.cfg
+++ b/tcl/target/str710.cfg
@@ -39,8 +39,10 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
$_TARGETNAME configure -work-area-phys 0x2000C000 -work-area-size 0x4000 -work-area-backup 0
#flash bank str7x <base> <size> 0 0 <target#> <variant>
-flash bank str7x 0x40000000 0x00040000 0 0 0 STR71x
-flash bank str7x 0x400C0000 0x00004000 0 0 0 STR71x
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str7x 0x40000000 0x00040000 0 0 0 STR71x
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str7x 0x400C0000 0x00004000 0 0 0 STR71x
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/str730.cfg b/tcl/target/str730.cfg
index c98d56c8..6432d154 100644
--- a/tcl/target/str730.cfg
+++ b/tcl/target/str730.cfg
@@ -42,5 +42,6 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash bank str7x 0x20000000 0x00040000 0 0 0 STR3x
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 0 STR3x
diff --git a/tcl/target/str750.cfg b/tcl/target/str750.cfg
index 5439c335..496c4e3c 100644
--- a/tcl/target/str750.cfg
+++ b/tcl/target/str750.cfg
@@ -45,6 +45,8 @@ $_TARGETNAME configure -event gdb-flash-erase-start {
$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
#flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash bank str7x 0x20000000 0x00040000 0 0 0 STR75x
-flash bank str7x 0x200C0000 0x00004000 0 0 0 STR75x
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str7x 0x20000000 0x00040000 0 0 0 STR75x
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str7x 0x200C0000 0x00004000 0 0 0 STR75x
diff --git a/tcl/target/str912.cfg b/tcl/target/str912.cfg
index 0dd68483..d8445849 100644
--- a/tcl/target/str912.cfg
+++ b/tcl/target/str912.cfg
@@ -63,8 +63,10 @@ $_TARGETNAME configure -event reset-init {
$_TARGETNAME configure -work-area-phys 0x50000000 -work-area-size 16384 -work-area-backup 0
#flash bank str9x <base> <size> 0 0 <target#> <variant>
-flash bank str9x 0x00000000 0x00080000 0 0 0
-flash bank str9x 0x00080000 0x00008000 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str9x 0x00000000 0x00080000 0 0 0
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME str9x 0x00080000 0x00008000 0 0 0
# For more information about the configuration files, take a look at:
# openocd.texi
diff --git a/tcl/target/telo.cfg b/tcl/target/telo.cfg
index c4e5d67f..0cbdb816 100644
--- a/tcl/target/telo.cfg
+++ b/tcl/target/telo.cfg
@@ -54,7 +54,8 @@ proc srst_deasserted {} { puts "Sensed nSRST deasserted. No action." }
# boots from NOR on CS0: 8 MBytes CFI flash, 16-bit bus
# it's really 16MB but the upper 8mb is controller via gpio
# openocd does not support 'complex reads/writes' to NOR
-flash bank cfi 0x20000000 0x01000000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x20000000 0x01000000 2 2 $_TARGETNAME
# writing data to memory does not work without this
memwrite burst disable \ No newline at end of file
diff --git a/tcl/target/xba_revA3.cfg b/tcl/target/xba_revA3.cfg
index 9d258a52..fb02c687 100644
--- a/tcl/target/xba_revA3.cfg
+++ b/tcl/target/xba_revA3.cfg
@@ -79,7 +79,8 @@ $_TARGETNAME configure -event reset-init {
$_TARGETNAME configure -work-area-phys 0x20010000 -work-area-size 0x8060 -work-area-backup 0
-flash bank cfi 0x50000000 0x400000 2 2 $_TARGETNAME
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME cfi 0x50000000 0x400000 2 2 $_TARGETNAME
init
reset init
diff --git a/tcl/test/syntax1.cfg b/tcl/test/syntax1.cfg
index 40a7c1db..c3d8ed90 100644
--- a/tcl/test/syntax1.cfg
+++ b/tcl/test/syntax1.cfg
@@ -25,5 +25,6 @@ mvb 0xE01FC040 0x01
-flash bank lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 14765
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x7d000 0 0 0 lpc2000_v2 14765