Hello,
I have a Nuvoton M2351 (Cortex-M23) and I am trying to get RTX5 to run on it. The board initialization, secure main code and switch to non-secure main runs correctly but a hard fault is always triggered whenever osKernelInitialize() is called by the non-secure main function. Specifically, when stepping through the function, it seems to occur when TZ_InitContextSystem_S() is called.
osKernelInitialize()
TZ_InitContextSystem_S()
NonSecure.axf:
0x1004323a: f000ff89 .... BL $Ven$TT$L$$TZ_InitContextSystem_S ; 0x10044150 ... $Ven$TT$L$$TZ_InitContextSystem_S 0x10044150: b403 .. PUSH {r0,r1} 0x10044152: 4801 .H LDR r0,[pc,#4] ; [0x10044158] = 0x8f1 0x10044154: 9001 .. STR r0,[sp,#4] 0x10044156: bd01 .. POP {r0,pc}
0x1004323a: f000ff89 .... BL $Ven$TT$L$$TZ_InitContextSystem_S ; 0x10044150
...
$Ven$TT$L$$TZ_InitContextSystem_S 0x10044150: b403 .. PUSH {r0,r1} 0x10044152: 4801 .H LDR r0,[pc,#4] ; [0x10044158] = 0x8f1 0x10044154: 9001 .. STR r0,[sp,#4] 0x10044156: bd01 .. POP {r0,pc}
Secure.axf:
TZ_InitContextSystem_S 0x000008f0: e97fe97f .... SG ; [0x6f8] = 0x4c1760042406600c 0x000008f4: f7ffbe3e ..>. B.W __acle_se_TZ_InitContextSystem_S ; 0x574
The most interesting thing that occurs in my opinion is that the code jumps to the Hard Fault Handler right after the instruction at 0x1004323a is executed. I don't understand why this should occur since it is simply branching to 0x10044150 and should not trigger a hard fault.
Any reason why this is occurring?
Thank you