TCL scripts: update to current "flash bank" syntax
authorAntonio Borneo <borneo.antonio@gmail.com>
Fri, 26 Mar 2010 07:17:46 +0000 (15:17 +0800)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Fri, 26 Mar 2010 07:42:58 +0000 (08:42 +0100)
While "flash bank" syntax has been changed long ago,
several tcl script are still not fully update.

Fix following cases related with "cfi" driver:
- syntax error: the mandatory <name> parameter is missing
- warning: the <target> parameter is a number, instead of
  the target name
- the comment line above the command does not report
  actual syntax

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
12 files changed:
tcl/board/at91rm9200-dk.cfg
tcl/board/balloon3-cpu.cfg
tcl/board/digi_connectcore_wi-9c.cfg
tcl/board/dm6446evm.cfg
tcl/board/hammer.cfg
tcl/board/imx27ads.cfg
tcl/board/logicpd_imx27.cfg
tcl/board/topas910.cfg
tcl/board/topasa900.cfg
tcl/board/unknown_at91sam9260.cfg
tcl/board/x300t.cfg
tcl/target/at91sam9260_ext_RAM_ext_flash.cfg

index 476f5a80d5fc4549fb8278a86b69a96fb5e61919..af6e3df2025511b86186b002a2e26be323596d91 100644 (file)
@@ -8,8 +8,9 @@ source [find target/at91rm9200.cfg]
 $_TARGETNAME configure -event gdb-attach { reset init }
 $_TARGETNAME configure -event reset-init { at91rm9200_dk_init }
 
-#flash bank <driver> <base> <size> <chip_width> <bus_width>
-flash_bank cfi 0x10000000 0x00200000 2 2 0
+#flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target>
+set _FLASHNAME $_CHIPNAME.flash
+flash_bank $_FLASHNAME cfi 0x10000000 0x00200000 2 2 $_TARGETNAME
 
 
 proc at91rm9200_dk_init { } {
index ecb1a282543b9138aa00934cc802a815b5950927..468b867b27293e35c855dbc9d82c1c8c2ade51ff 100644 (file)
@@ -8,7 +8,7 @@ source [find target/pxa270.cfg]
 # Override this in the interface config for parallel dongles
 reset_config trst_and_srst separate
 
-# flash bank <driver> <base> <size> <chip_width> <bus_width>
+# flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target>
 # 29LV650 64Mbit Flash
 set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME cfi 0x00000000 0x800000 2 2 0
+flash bank $_FLASHNAME cfi 0x00000000 0x800000 2 2 $_TARGETNAME
index ad40d537fe8b477bf43e73a4cc22f82b190ddf50..096af1b66d67c05e823b3effb836e1d8d1153f0b 100644 (file)
@@ -125,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
index 39607fe37d57992161c202e78a1e71c5eb82c3f6..dcd1c4ef870199895787e48a9559dff023f12a5d 100644 (file)
@@ -31,7 +31,8 @@ if { [info exists J4_OPTION] } {
 if { $CS2_MODE == "NOR" } {
        # 16 Mbytes address space; 16 bit bus width
        # (older boards used 32MB parts, with upper 16 MB unusable)
-       flash bank cfi 0x02000000 0x01000000 2 2 $_TARGETNAME
+       set _FLASHNAME $_CHIPNAME.flash
+       flash bank $_FLASHNAME cfi 0x02000000 0x01000000 2 2 $_TARGETNAME
        proc flashprobe {} { flash probe 0 }
 } elseif { $CS2_MODE == "NAND" } {
        # 64 Mbyte small page; 8 bit bus width
index d366a45ecd50d92ed4d3943efff35606d22ac96e..ea3da81230c887ebe7aa57e3d966e93e5632fbed 100644 (file)
@@ -32,6 +32,6 @@ $_TARGETNAME configure -event reset-init {
 
 
 #flash configuration
-#flash bank <driver> <base> <size> <chip_width> <bus_width> [driver_options ...]
+#flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target> [driver_options ...]
 set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME cfi 0x00000000 0x1000000 2 2 0
+flash bank $_FLASHNAME cfi 0x00000000 0x1000000 2 2 $_TARGETNAME
index 664b4705cac1d203484bc9acc317e9e401c17190..927647a9b65016a78eeefa035165738d8d025b41 100644 (file)
@@ -5,7 +5,8 @@ $_TARGETNAME configure -event gdb-attach { reset init }
 $_TARGETNAME configure -event reset-init { imx27ads_init }
 
 # The IMX27 ADS board has a NOR flash on CS0
-flash_bank cfi 0xc0000000 0x00200000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash_bank $_FLASHNAME cfi 0xc0000000 0x00200000 2 2 $_TARGETNAME
 
 proc imx27ads_init { } {
        # This setup puts RAM at 0xA0000000
index b068f1a105d0fdcf08a07bad76a4a2245e77b218..02afc7743c6700ceef7739a95a70ae879234952c 100644 (file)
@@ -2,7 +2,8 @@
 source [find target/imx27.cfg]
 
 # The Logic PD board has a NOR flash on CS0
-flash_bank cfi 0xc0000000 0x00200000 2 2 0
+set _FLASHNAME $_CHIPNAME.flash
+flash_bank $_FLASHNAME cfi 0xc0000000 0x00200000 2 2 $_TARGETNAME
 
 #
 # FIX ME, Add support to
index 303fc7782d2edb16f3d5680e06cc52d0e001fa70..333b016ba1b6f5a668510175775e84e37e5d4f4c 100644 (file)
@@ -114,6 +114,6 @@ arm7_9 dcc_downloads enable       # Enable faster DCC downloads
 # Flash configuration
 #####################
 
-#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 0x20000000 0x2000000 2 2 0
+flash bank $_FLASHNAME cfi 0x20000000 0x2000000 2 2 $_TARGETNAME
index aa3f77f2fd0183a9847451f1d3eb3dddf0c42741..065cd317aa61df29278caf5df2bc160fdf1842df 100644 (file)
@@ -120,7 +120,7 @@ arm7_9 dcc_downloads enable       # Enable faster DCC downloads
 # Flash configuration
 #####################
 
-#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 0x20000000 0x1000000 2 2 0
+flash bank $_FLASHNAME cfi 0x20000000 0x1000000 2 2 $_TARGETNAME
 
index ad7b13c7359cc581d800d4195e4f84bc1f41ab17..845de6b96e0e3343627c25492856ae4bde81d83d 100644 (file)
@@ -90,8 +90,8 @@ $_TARGETNAME configure -event reset-init {
 # Flash configuration
 #####################
 
-#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 0x10000000 0x01000000 2 2 0
+flash bank $_FLASHNAME cfi 0x10000000 0x01000000 2 2 $_TARGETNAME
 
 
index d9141809889ae813b6443672c17fc863dc1d737a..9d9a320fbbc57234004969b61f2b92bd8ddc064d 100644 (file)
@@ -7,9 +7,9 @@ source [find target/smp8634.cfg]
 $_TARGETNAME configure -event reset-init { x300t_init }
 
 # 1MB CFI capable flash
-# flash bank <driver> <base> <size> <chip_width> <bus_width>
+# flash bank <name> <driver> <base> <size> <chip_width> <bus_width> <target>
 set _FLASHNAME $_CHIPNAME.flash
-flash bank $_FLASHNAME cfi 0xac000000 0x100000 2 2 0
+flash bank $_FLASHNAME cfi 0xac000000 0x100000 2 2 $_TARGETNAME
 
 proc x300t_init { } {
        # Setup SDRAM config and flash mapping
index 034a3489007dfc739e997efaf87e9afe59e1bd9e..d2bf66fe7db6b42628bf0e7abe224f08d2006c89 100644 (file)
@@ -54,7 +54,7 @@ $_TARGETNAME configure -event reset-deassert-post {at91sam_init}
 
 
 # Flash configuration
-#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 0x10000000 0x01000000 2 2 $_TARGETNAME
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)