bdi
SCI
JTAG debug interface for SeeCode™ Debugger, BDI2000 (PPC744x/745x)
User Manual 22
© Copyright 1999-2003 by ABATRON AG
V 1.00
5.4 Download to Flash Memory
The BDI supports download and debugging of code that runs out of flash memory. To automate the
process of downloading to flash memory, the BDI looks for two command files in the working direc-
tory.
PRELOAD.CMD
This command file is executed just before download begins
POSTLOAD.CMD
This command file is executed after download is terminated.
Following an example used to download into the flash memory.
PRELOAD.CMD:
;Reset target
target.reset
;Define used flash memory: AM29F040
flash.setup type=am29f size=0x80000 bus=32
;
;Erase sector 0 and 1 of flash memory bank
flash.erase addr=0x02800000
flash.erase addr=0x02840000
;
;Enable loading into flash
flash.load addr=0x02800000 size=0x200000
POSTLOAD.CMD:
flash.idle
Note:
Some Intel flash chips (e.g. 28F800C3, 28F160C3, 28F320C3) power-up with all blocks in locked
state. In order to erase/program those flash chips, use the init list to unlock the appropriate blocks.
WM16
0xFFF00000
0x0060
unlock block 0
WM16
0xFFF00000
0x00D0
WM16
0xFFF10000
0x0060
unlock block 1
WM16
0xFFF10000
0x00D0
....
WM16
0xFFF00000
0xFFFF
select read mode