Content originally posted in LPCWare by capiman on Wed Dec 10 12:30:01 MST 2014
@Georg
Your problem seems to be that the two flash areas are not directly located one after the other, but with a gap between.
@lpcxpresso-support
Can you give a bit more details? Is it correct that the problem is the tool chain and its linker scripts,
not the LPC43xx itself?
Usually (when only using one flash bank) you have a linker scripts like
MEMORY
{
FLASH (rx) : ORIGIN = 0x1A000000, LENGTH = 0x00080000
SRAM (rwx) : ORIGIN = 0x10080000, LENGTH = 0x0000A000
}
When using two banks you would have something like
MEMORY
{
FLASH1 (rx) : ORIGIN = 0x1A000000, LENGTH = 0x00080000
FLASH2 (rx) : ORIGIN = 0x1B000000, LENGTH = 0x00080000
SRAM (rwx) : ORIGIN = 0x10080000, LENGTH = 0x0000A000
}
But there you have a limitation that linker must be able to handle multiple flash section?
Or is there a way(or tool chain) which supports this?
Another idea:
MEMORY
{
FLASH (rx) : ORIGIN = 0x1A000000, LENGTH = 0x01080000
SRAM (rwx) : ORIGIN = 0x10080000, LENGTH = 0x0000A000
}
But then you must somehow define that between 0x1A080000 and 0x1AFFFFFF nothing can be located. Don't know if this can be done...
Would it be possible (just a general question, not saying it is a good idea), that a (BIG) bootloader is located in flash bank A,
and a (BIG) application is located in flash bank B.
Bootloader does something (even offering a lot utility functions like ROM API for the application) and finally jumps to application.