bdi
GDB
for GNU Debugger, BDI2000 (ARM11 / Cortex)
User Manual
37
© Copyright 1997-2014 by ABATRON AG Switzerland
V 1.21
LPC1000 Internal Flash:
The LPC1xxx internal flash is programmed using the LPC1xxx built-in flash programming driver via
the so called IAP Commands. Details about the IAP commands you find in the LPC1xxx user's man-
ual. This driver needs the current System Clock Frequency (CCLK) in kHz. This frequency has to be
provided via the CHIPTYPE parameter:
CHIPTYPE LPC1000 <fsys(kHz)>
CHIPTYPE LPC1000 96000 ;LPC1768 flash, CCLK = 96.000 MHz
The erase parameter has a different meaning. It is not an address but a bit map of the sectors
to erase (bit0 = erase sector 0, bit1 = erase ....). If you add BLANK after the sector map, then a blank
check is executed after the erase. Following some examples:
ERASE 0x000000F0 BLANK ;erase sector 4...7 with blank check
ERASE 0x00007FFF BLANK ;erase sector 0...14 with blank check
ERASE 0x0FF00000 BLANK ;erase sector 20...27 with blank check
ERASE 0x00000002 ;erase only sector 1, no blank check
The BDI needs a workspace of 1.5 kbytes (0x600) in the internal SRAM. It is used to store the data
to program and to create a context from which the flash drivers can be called.
Examples (see also LPC1114 and LPC1768 configuration files on the CD):
[FLASH]
CHIPTYPE LPC1000 96000 ;LPC1768 flash, CCLK = 96.000 MHz
CHIPSIZE 0x80000 ;512kB flash
WORKSPACE 0x10000000 ;internal SRAM for buffer, code and stack
FILE E:\temp\dump256k.bin
FORMAT BIN 0x00030000
ERASE 0x0FF00000 BLANK ;erase sector 20...27 with blank check
[FLASH]
CHIPTYPE LPC1000 12000 ;LPC1114 flash, CCLK = 12.000 MHz
CHIPSIZE 0x8000 ;32kB flash
WORKSPACE 0x10000000 ;internal SRAM for buffer, code and stack
FILE E:\temp\dump8k.bin
FORMAT BIN 0x00006000
ERASE 0x000000C0 BLANK ;erase sector 6...7 with blank check
Energy Micro EFM32 Internal Flash Memory:
The BDI supports programming of the Energy Micro EFM32 internal flash memory.
[FLASH]
CHIPTYPE EFM32
CHIPSIZE 0x20000
;128 kB FLASH
FILE E:/temp/dump16k.bin
FORMAT BIN 0x00010000
ERASE 0x00010000 512 32
;erase 32 x 512 byte pages