I'm using LPC1768 with LPCXpresso 8.1.4.
There is a bootloader on the low flash 0x -0x10000 (64kB).
So the size of the main code is limited to 448kB. The memory is declared in MCU Settings (Project properties) :
and the linkscripts for memory is the following:
After build with Size optimization option (-s), the code size is 413404bytes (90.11% out of 448kB). so there is is almost 10% free space. the image is running as desired.
After adding some extra code, the size goes up to 415204bytes (90.507% out of 448kb). At this moment the code image is not running anymore. If I keep the new extra code in place and comment some other lines of code to reduce the size back close to 90%, it runs again. I made several tests to confirm that the issue is not with the latest added code but with the size of the image.
The flash memory declaration looks correct to me.
What could be wrong ?
Nb: still with LPCXpresso V8.1.4 because i'm using a library which doesn't work properly with MCUXpresso, no time to search why yet...
Thank's for your help!
How about debug to check where is the issue?
To do this, edit the launch configuration (by double clicking on the .launch file that will have been created in your project) and change the "reset handling" option to "SOFT", refer to:
I don't have any issue in Debug, only in Release.
To debug I set the Flash start address at 0x00000 and size to 0x80000 (512kB). Optimization is -Og.
For release, the flash starts at 0x10000 and size is 0x70000 (448kb). 64kb are reserved for bootloader. Optimization is -Os.
I didn't find a way to tell the debugger that application starts at 0x10000, so I can't debug the "Release" version. Maybe there is a way ?
By the way, here are the options for debugging:
no "SOFT" option...