I am having a boot problem I have some difficulties debugging.
Our system has a custom bootloader to update the system.
After power up, the custom bootloader is loaded from SPI flash. It reads out some areas in the SPI flash to detect if an application exists. If it does, it will boot that application using bfrom_SpiBoot( APP_START, BFLAG_PERIPHERAL | 3 | BFLAG_FASTREAD, 0, NULL );
Everything works perfect.
Now, every once in a while I make an application that causes the bfrom_SpiBoot to get stuck. If I debug the custom bootloader I get this error:
Target halted due to software breakpoint but no breakpoint found at address: 0xef000746
Possible reasons are:
1.An embedded breakpoint (EMUEXCPT instruction) in the code
2.A breakpoint is placed at the last instruction of a do() loop
If I change a small thing in my application, ie, instead of initialize a global variable at runtime, I initialize it globally, then the booting works fine.
Additional, it does not seems to have anything to do with the size of the application, as much bigger applications loads fine too.
Finally, if I store my "failure" application at address 0, causing this application to be boot'ed at power up, it works fine.
Question. How can I debug bfrom_SpiBoot to find out what the cause of its bootfailure, for these few specific ldr files?