using this code:
Boot_JumpToApp(resetHandlerAddr);
Reset_Handler();
caused "HardFault_Handler".
debugger message at this point:
"UsageFault: An instruction executed with an invalid EPSR.T or EPSR.IT field.
HardFault: A fault has been escalated to a hard fault."
that is the reason, why I check "thumb" mode and force switch to it.
removing :
"
// force_thumb_mode();
__asm volatile
(
"BX PC \n" // Branch to the next instruction, ensuring Thumb mode
"NOP \n" // No operation (acts as a placeholder)
);
"
does not change hard fault.