Hello I'm using fragments of the kboot for my own Bootloader. I'm using the jump_to_application(applicationAddress, stackPointer) function in the same way as you do. I get some strange behaviour now. If I start my application from the Bootloader the application is started correctly. If I just increase the size of a global Array of chars by one the application is not started anymore and it is stopped in an Hardware fault.
works with:
uint8_t wert[5];
does not work with:
uint8_t wert[4];
The problem seems to be in the zero initialize. The crash happens before reaching the main routine, in the Reset_Handler of the application. The System_init is called and executed correctly. The difference in the *.map file from the working version on the right of the picture and the non working on the left:
If I put the section to noInit in the target dialog it also works with the array of 4 Bytes. Might there be a problem with the aligning and how can I manage that?
This issue has nothing to do with bootloader, becase the app has been successfully jumpped to.
Please debug this issue and reach the position where hardfault happens, and share the realted assembly code with me, then we can analyze this issue further.
Hi,
Could you provide more detailed info about the hardware fault?
Please provide the ARM Cortex-M core SCB related registers info, when the hardware fault happened.
SCB_BFAR
SCB_CFSR
SCB_HFSR
SCB_DFSR
SCB_AFSR
SCB_SHCSR
best regards,
Mike