update 'flash bank' usage in scripts
authorZachary T Welch <zw@superlucidity.net>
Wed, 18 Nov 2009 10:15:52 +0000 (02:15 -0800)
committerZachary T Welch <zw@superlucidity.net>
Thu, 19 Nov 2009 21:39:41 +0000 (13:39 -0800)
Sets $_FLASHNAME to "$_CHIPNAME.flash" and passes it as the
first argument to 'flash bank'.

58 files changed:
tcl/board/balloon3-cpu.cfg
tcl/board/crossbow_tech_imote2.cfg
tcl/board/csb337.cfg
tcl/board/digi_connectcore_wi-9c.cfg
tcl/board/hammer.cfg
tcl/board/hitex_lpc2929.cfg
tcl/board/hitex_str9-comstick.cfg
tcl/board/lubbock.cfg
tcl/board/omap2420_h4.cfg
tcl/board/osk5912.cfg
tcl/board/pxa255_sst.cfg
tcl/board/str910-eval.cfg
tcl/board/telo.cfg
tcl/board/topas910.cfg
tcl/board/topasa900.cfg
tcl/board/unknown_at91sam9260.cfg
tcl/board/x300t.cfg
tcl/board/zy1000.cfg
tcl/target/aduc702x.cfg
tcl/target/at91eb40a.cfg
tcl/target/at91r40008.cfg
tcl/target/at91sam3u1c.cfg
tcl/target/at91sam3u1e.cfg
tcl/target/at91sam3u2c.cfg
tcl/target/at91sam3u2e.cfg
tcl/target/at91sam3u4c.cfg
tcl/target/at91sam3u4e.cfg
tcl/target/at91sam7sx.cfg
tcl/target/at91sam9260_ext_RAM_ext_flash.cfg
tcl/target/epc9301.cfg
tcl/target/faux.cfg
tcl/target/lm3s1968.cfg
tcl/target/lm3s3748.cfg
tcl/target/lm3s6965.cfg
tcl/target/lm3s811.cfg
tcl/target/lm3s9b9x.cfg
tcl/target/lpc1768.cfg
tcl/target/lpc2103.cfg
tcl/target/lpc2124.cfg
tcl/target/lpc2129.cfg
tcl/target/lpc2148.cfg
tcl/target/lpc2294.cfg
tcl/target/lpc2378.cfg
tcl/target/lpc2478.cfg
tcl/target/lpc2900.cfg
tcl/target/mega128.cfg
tcl/target/pic32mx.cfg
tcl/target/sam7se512.cfg
tcl/target/sam7x256.cfg
tcl/target/smdk6410.cfg
tcl/target/stm32.cfg
tcl/target/str710.cfg
tcl/target/str730.cfg
tcl/target/str750.cfg
tcl/target/str912.cfg
tcl/target/telo.cfg
tcl/target/xba_revA3.cfg
tcl/test/syntax1.cfg

index 8a646b765406828b76296f64aa4cae6b11052709..ecb1a282543b9138aa00934cc802a815b5950927 100644 (file)
@@ -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
index a7d12156a790c469d3453b41b0cc5416fbef6b9a..88d4aa72db18a51293842a6b43738e7786fa2ccd 100644 (file)
@@ -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
index c2c47898be642d01be912f81544c0261b9034d2c..de196604812b59ddace7d955aceb468f508d7b29 100644 (file)
@@ -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] } {
index e6d17bdd8dc99ddf5fd7adf33c26934195decbad..3bc26adf8a7b2be0640d86dd026fa256604ecd7a 100644 (file)
@@ -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
index ed83803fb5c6692f106833e239eef9f425ee87a4..d366a45ecd50d92ed4d3943efff35606d22ac96e 100644 (file)
@@ -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
index d0b28647cf32bd230f1ec0a6f1f61e62e41e7313..7d06f7452116c2e7f717ba428e7c4afd68cb1e61 100644 (file)
@@ -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 {
index e7b79616c2fd1e8e8fdd84baeff640709bb4c1e1..968d80eccb2de077cc51aecda106df8b8039e359 100644 (file)
@@ -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
index 63cc2a41083e11fec68d2ac63dcf506dddf0bb05..32af386ec8f8f595addf8e44715c450138065670 100644 (file)
@@ -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
index c2190b5c18d9ed480cf020934c2b065217904b51..12efa0531bbaeb3dd40842c8dc6ff0d0cb33c156 100644 (file)
@@ -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
index d78c6efff084c689dab53f54f6ac2b99ceef4fdf..c33ae285ce8c2aec416774be987e36478cf05bff 100644 (file)
@@ -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
index 8bc691bab190dee5b385012471c75d44d5d5c986..ce9038710e0ec190fa9d1ab2f6bbf2a40463fcc3 100644 (file)
@@ -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
index fa872a9bd7f644e99177047e19152d9451411447..0cf794aecedde62ab568ede79808792a086986c1 100644 (file)
@@ -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
index c4e5d67f48df2c84e987b6cc2b52094686455079..0cbdb816d9ec85a4fb1aabf43a4dbcb91fcbcc32 100644 (file)
@@ -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
index ce7c87a49a1fbeb2f68b330ec39522c11e1d53f1..ae72c4b7aa14be28489181e8499e85c9ad343e6f 100644 (file)
@@ -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
index a8a6caf6652a4c47696a2f313c7b4b6bb5f4cc54..5984f81ffa960621d5da9f399499d69321a8f8d9 100644 (file)
@@ -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
 
index 2abd367fd930347805455bc00319f90040b26ac4..ad7b13c7359cc581d800d4195e4f84bc1f41ab17 100644 (file)
@@ -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
 
 
index 3b094930152c633da46ae3d2f264438c777cfe1b..d9141809889ae813b6443672c17fc863dc1d737a 100644 (file)
@@ -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
index 54bb7bb7453ccef03c86d087d5d2cd412ec253ea..3f526d068b6d5f370afbb021615b8e3231f7b807 100644 (file)
@@ -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
index b60c9679bbe11a053e4bdca803e565fd0edfc253..58cc9b9873034a502072870422a795abff1eb977 100644 (file)
@@ -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
index 8b3a9ec1cf495e7754637174bdba0590b4bf0615..e78cceaca08a4b419d297487616284b5c1d1b5e1 100644 (file)
@@ -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.
index e8710f7f3859417544f96317d01e6e34a4b3e32c..9069ae563b15f3c4cbe375bf3b9929c55f42bf0b 100644 (file)
@@ -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
index d338f305b27e56c06c2aaf42e366b560f09a0588..47c227b262cfb7eb8eef7c3ae4913498b6c48241 100644 (file)
@@ -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
 
 
index d338f305b27e56c06c2aaf42e366b560f09a0588..47c227b262cfb7eb8eef7c3ae4913498b6c48241 100644 (file)
@@ -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
 
 
index d338f305b27e56c06c2aaf42e366b560f09a0588..47c227b262cfb7eb8eef7c3ae4913498b6c48241 100644 (file)
@@ -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
 
 
index d338f305b27e56c06c2aaf42e366b560f09a0588..47c227b262cfb7eb8eef7c3ae4913498b6c48241 100644 (file)
@@ -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
 
 
index e8fdababafc0a472d9fabcf4b0e5894a2c3ef02b..e281287070c9fba24cd10b41d5f593ddd1bc8bf6 100644 (file)
@@ -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
 
 
index 9477ad0079a058a438d41ced1565810313285e89..242b53ee08863c8de283073e43664e0d5979b3ce 100644 (file)
@@ -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
 
 
index 2a7f90c5b0c82a7126ae541a5d13205b5de22ac1..f3cc88e99c9625e6bd73b08166c2d596f066ccc5 100644 (file)
@@ -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
index de7e9ab228e4a04f75cc2b32ffea59155c28ad3e..690406bb3aef22b556d8a6e3ef1f31e147a7e072 100644 (file)
@@ -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 { } {
index eaf4ee9676d61e32bf87606461e298449d2639af..7e4599da8fc44d1d8ef0a08db35ff222c91097c2 100644 (file)
@@ -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
index cc09ee314063dcec977ad540ea360f9de2de1b04..6fe0cd799dc3f83008e207195b3cf821bab962cd 100644 (file)
@@ -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
index e54bbfe5aacde72e51772eb93f8a01e95957b0b2..330bb56a25185639a7eb1fbf61b36280c1ed6ff3 100644 (file)
@@ -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
index 5317a6d9b9e0aa108ed0f8b4d3aa4a260586b0ae..274377a7e89afaf899f67068d8c5764338620d46 100644 (file)
@@ -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
index f0eb6b0d582e647d4164892fd03a9f66014ff342..02d85d467aaf9cfd5d0188629c5b7141a39ab0cb 100644 (file)
@@ -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
index 821069617edec2976c203e3d9d8a8faa9888d8ad..49879d09f0815c943b99499f79e2b521b12af763 100644 (file)
@@ -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
index e822bb28a183f00ba1d94ae3e9d0dd4324b30040..a727251ffc67835c37215b91473c18b1d90b3e1e 100644 (file)
@@ -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
index 0b07d51ffb789312caf3871f21c7e26c16fc3c21..9a813f5b94ee392b084220d64770d361ed629d07 100644 (file)
@@ -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
index 0aadee8eb75c7cd087d10ec7ddf646ebfa3b80e3..13535f593748aa39475033ce5590924265325750 100644 (file)
@@ -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
index 471286b88769a982c0b12370561bb5c25cb27868..9a27aece5d5673eac17d34dc158090ad626c01d3 100644 (file)
@@ -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
index a686a4716033d719fe7785e6f700387ab1bf98ba..287fa5d06b5a121de3bc7066a9b5a87bf9d913a1 100644 (file)
@@ -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
index 1f833e72bd5033eb4c21728d10ec34916fb0c695..cf6287c60eb1e3d256d1e1e6ffc19a2871dd8caa 100644 (file)
@@ -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
index a34940ed6943b1fc3a2f719c145c6800f98d646d..d43d740b0733c2f30cb9e26dae585aec4103d74b 100644 (file)
@@ -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
index aa3fad26c4c3919b9f5f8013fb299ae94e5337ac..4e50ac5c856977fd3dbb88cff7b50e75ecb098f9 100644 (file)
@@ -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
index b0af4c02d77ad591f34364706c0c5527767d347d..d0bff1ae46ce49fa5b6ca63d9da69780440aaa5a 100644 (file)
@@ -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
index fa5bd5bb78ef4bc5e7be9f24f4ef91742f367bc1..2371dd7aac82c102e38add819e8b5863ab81c73d 100644 (file)
@@ -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
index e444889ebec5fea3aa4102aa0b70bcb9d615f2cb..2bc22949707a823cad67d13626dda198a2a4bde2 100644 (file)
@@ -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
index 6127a5404f539f3a51240b397ef0a4a3de6b6518..a346c471c3128085fb56e2c7827f4e1f8eab14ce 100644 (file)
@@ -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
index 0f1e41263b6fe6c0d811d8286ca939e17eb89544..d2550678bcfc36d89cff8a7f35b5dd45d23e3557 100644 (file)
@@ -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
 
index c3f7cd9cae3115887b86628e5332e82188b3bb88..5bab642152a0216b93c6233a41ba18a1a4e28f10 100644 (file)
@@ -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
index 7f15f8b8769966a48bcbd3144b816abf8228766a..dd8bf87ad71ef15abf0c945ec94e526b1e0075fa 100644 (file)
@@ -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
index 242bbbee7bfba0939df6b974981cf791af3efc9b..463a85cfd2ba9f8503007f96fbdd5248f957752a 100644 (file)
@@ -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
index 8e5d36f0038533950ec7a99bcb7be39e13533ca9..395a26cdff0449f125b294aaf3eb3678bfbbb3e0 100644 (file)
@@ -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
index c98d56c818460374bb505fae783432d6a7314d71..6432d1542841e05584a8b3f40edcad6b9f950d5e 100644 (file)
@@ -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
 
index 5439c3351df180c40dfabf859e247a5d2be56729..496c4e3cfdcf87455ce098793be410324dfe2037 100644 (file)
@@ -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
 
index 0dd684835d3358a2e7c9b62c377e39a21bf52a68..d84458495eee154462533eb69205dc10c99eeba1 100644 (file)
@@ -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
index c4e5d67f48df2c84e987b6cc2b52094686455079..0cbdb816d9ec85a4fb1aabf43a4dbcb91fcbcc32 100644 (file)
@@ -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
index 9d258a52118762fd6811286e654b498e4f83c4a1..fb02c687c82d5983513733c1b3c8f711155056c0 100644 (file)
@@ -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
index 40a7c1db754ba7e8a74e7620e3e843fefcbc073a..c3d8ed90617e1f56446d11b9c902c46bf6153e76 100644 (file)
@@ -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