bdi
GDB
for GNU Debugger, BDI2000 (ARM11 / Cortex)
User Manual
34
© Copyright 1997-2014 by ABATRON AG Switzerland
V 1.21
ERASE addr [increment count] [mode [wait]]
The flash memory may be individually erased or unlocked via the Telnet
interface. In order to make erasing of multiple flash sectors easier, you can
enter an erase list. All entries in the erase list will be processed if you enter
ERASE at the Telnet prompt without any parameter. This list is also used
if you enter UNLOCK at the Telnet without any parameters. With the "in-
crement" and "count" option you can erase multiple equal sized sectors
with one entry in the erase list.
address
Address of the flash sector, block or chip to erase
increment
If present, the address offset to the next flash sector
count
If present, the number of equal sized sectors to erase
mode
BLOCK, CHIP, UNLOCK
Without this optional parameter, the BDI executes a sec-
tor erase. If supported by the chip, you can also specify
a block or chip erase. If UNLOCK is defined, this entry is
also part of the unlock list. This unlock list is processed
if the Telnet UNLOCK command is entered without any
parameters.
Note:
Chip erase does not work for large chips because
the BDI time-outs after 3 minutes. Use block erase.
wait
The wait time in ms is only used for the unlock mode. Af-
ter starting the flash unlock, the BDI waits until it pro-
cesses the next entry.
Example:
ERASE 0xff040000 ;erase sector 4 of flash
ERASE 0xff060000 ;erase sector 6 of flash
ERASE 0xff000000 CHIP ;erase whole chip(s)
ERASE 0xff010000 UNLOCK 100 ;unlock, wait 100ms
ERASE 0xff000000 0x10000 7 ; erase 7 sectors
Example for the ARM PID7T board (AM29F010 in U12):
[FLASH]
WORKSPACE 0x00000000 ;Workspace in target RAM for faster programming algorithm
CHIPTYPE AM29F ;Flash type
CHIPSIZE 0x20000 ;The size of one flash chip in bytes
BUSWIDTH 8 ;The width of the flash memory bus in bits (8 | 16 | 32)
FILE C:\gdb\pid7t\bootrom.hex ;The file to program
ERASE 0x04000000 ;erase sector 0 of flash SIMM
ERASE 0x04004000 ;erase sector 1 of flash SIMM
ERASE 0x04008000 ;erase sector 2 of flash SIMM
ERASE 0x0400C000 ;erase sector 3 of flash SIMM
ERASE 0x04010000 ;erase sector 4 of flash SIMM
ERASE 0x04014000 ;erase sector 5 of flash SIMM
ERASE 0x04018000 ;erase sector 6 of flash SIMM
ERASE 0x0401C000 ;erase sector 7 of flash SIMM
the above erase list maybe replaced with:
ERASE
0x04000000 0x4000 8 ;erase 8 sectors