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?
Hi I think I have the same problem as you. But I am actually using a BF514F16. I use "bfrom_SpiBoot(0x10000,(BFLAG_PERIPHERAL | BFLAG_NOAUTO | BFLAG_FASTREAD | 2),0,0);". My application is at 0x10000. My application boots fine most of the time. But like you said, sometimes you just change a variable or some code and it wont boot. I also once just moved a variable around in a struct and that helped for a while. Just cant figure out what it is. My previous post is below.
Please let me know if you get any feedback or figure it out. I have read that one user recommended re-initializing the SPI just before "bfrom_SpiBoot" is called. Im going to try that today. Will let you know what I find.