uVision3 and Flash manage

Started by Peter Kic October 9, 2008
Hi!

I have lpc2378 with 512k flash. So I would like to use part of flash
for data storage, part for my own bootloader - upgrading sistem.

I looked, how to manage with flash. In "ULINK2 User's Guide" chapter
"Adding New Algorithms" is written how to do it. "LPC2000 IAP2 512kb
FLASH" file describe structure of FLASH. But there is not involve last
sector (address: 0x0007 D000 - 0x0007 DFFF). In comment is written
that this sector is bootload sector, but in User manual of lpc2378
says that boot block is in address: 0x0007E000 - 0x0007FFFF.

So 4k of flash is not used. Is this true? I won't like to try and
erase bootloder. It should be protected, but you never know.
How to set the address of function? You can set sector for functions
that are in c file, but how to set, that function is always on the
same address.
I would like to put main function in last sector(address: 0x0007 D000
- 0x0007 DFFF). This main function will just look if lpc need to be
reprogramed - not last sector (new hex file will be in external
flash/battery SRAM) or just go to main2 (real aplication). Address of
main2 must be always the same, no matter if flash is reprogramed.
Thanks,
Peter Kic

An Engineer's Guide to the LPC2100 Series