Content originally posted in LPCWare by mjulier on Wed Nov 06 07:42:49 MST 2013
My motivations were:
1) leaving an unused block for storing some configuration. The first blocks are smaller, so I needed a gap at 0x1000-0x1FFF, and to put parts of the code below 0x1000 and the rest after 0x2000. The hole is the section named ".bloc1flash", and it is not loaded because I want it not to be erased when I reprogram the CPU.
2) knowing which is the last byte used in the flash, because I store some data after the end. Not the end of the code, but the end of everything stored in the flash. This the symbol "_endflash".
3) for some reason, in a previous version, there was a problem that I could track to be caused by the data section not to be aligned on 8 bytes. I don't remember the exact reason, but I have to reason to worry about possibly losing 4 bytes.
Anyway, I can solve my problem, but the fact is that the linker produces some code and the debugger does not put all of it into the CPU in LPCXpresso-6, while it puts on the debug log that it has done just what is needed, and there is no problem in LPCXpresso-5 with exactly the same code.
Thanks