Hi Lihen Sternfeld,
How you jump to the relocated application code address?
Do you relocate the SP, and the VTOR register?
This is the jump code from the kboot2.0:
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);
static uint32_t s_stackPointer = 0;
s_stackPointer = stackPointer;
static void (*farewellBootloader)(void) = 0;
farewellBootloader = (void (*)(void))applicationAddress;
SCB->VTOR = (uint32_t)APP_VECTOR_TABLE;
__set_MSP(s_stackPointer);
__set_PSP(s_stackPointer);
farewellBootloader();
shutdown_cleanup(kShutdownType_Shutdown);
}
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------