Hardware Fault Interrupt when starting Application with Bootloader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hardware Fault Interrupt when starting Application with Bootloader

627 Views
sennivo
Contributor I

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 leftUnbenannt.PNG:

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?

0 Kudos
2 Replies

459 Views
jay_heng
NXP Employee
NXP Employee

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.

0 Kudos

459 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

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

0 Kudos