Hi @BiHDeveloper ,
1. If you directly test your app which located in 0x60080000, whether it works OK or not?
2. The hardware fault happens after the jumpto app, right? Or after enter the app, the app meet the hardfault?
3. to the jump code, you can refer to the flashloader:
static void jump_to_application(uint32_t applicationAddress, uint32_t stackPointer)
{
#if BL_FEATURE_OTFAD_MODULE
quadspi_cache_clear();
oftfad_resume_as_needed();
#endif
shutdown_cleanup(kShutdownType_Shutdown);
// Create the function call to the user application.
// Static variables are needed since changed the stack pointer out from under the compiler
// we need to ensure the values we are using are not stored on the previous stack
static uint32_t s_stackPointer = 0;
s_stackPointer = stackPointer;
static void (*farewellBootloader)(void) = 0;
farewellBootloader = (void (*)(void))applicationAddress;
// Set the VTOR to the application vector table address.
SCB->VTOR = (uint32_t)APP_VECTOR_TABLE;
// Set stack pointers to the application stack pointer.
__set_MSP(s_stackPointer);
__set_PSP(s_stackPointer);
// Jump to the application.
farewellBootloader();
// Dummy fcuntion call, should never go to this fcuntion call
shutdown_cleanup(kShutdownType_Shutdown);
}
also need to set stack point.
https://www.cnblogs.com/henjay724/p/9322963.html
If you still have issues, you also can refer to the SBL:
https://www.nxp.com/docs/en/application-note/AN13460.pdf
This also the secondary bootloader.
Wish it helps you!
Best Regards,
Kerry