lpcware

Application fails with LTO enabled

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by remcopoelstra on Thu Dec 04 02:39:43 MST 2014
Hi,

My application runs fine on a LPC812 when link time optimization is disabled. As soon as I enable it, then it will crash.
I noticed that the start of the flash contains very strange values:
For a running program:
0x10000FE0 0x103 0xD5 0xD7
For the crashing program:
0xA5C 0x10000000 0x4 0x10000004

The first value should indicate the stack pointer value, and it is correct for the running version, but not for the crashing version. The second address corresponds with the resetISR, which is correct for the running version, but not for the crashing version. The crashing version places ResetISR at 0x14, which seems a bit a low value, but does in no way correspond with the value in the vector table.

[EDIT: I'm using LPCxpresso 7.5.0]

How can I debug a problem like this?

Kind regards,

Remco Poelstra

Outcomes