This works until execution gets to 0x4172, where the lr register is pointing to garbage (0x0xfffffffd) so when the code jumps there it dies. The lr register points to a sensible address until the msr PSP, r0 call, which is when it changes into garbage. Any idea what I'm doing wrong?
I'm trying to run an app built using FreeRTOS using Unicorn, but I can't seem to get the exception handlers right.
Relevant FreeRTOS code:
When the
svc 0
exception is raised I set the PC to the corresponding entry in the vector table, which is hard-coded at the moment:This works until execution gets to
0x4172
, where thelr
register is pointing to garbage (0x0xfffffffd
) so when the code jumps there it dies. Thelr
register points to a sensible address until themsr PSP, r0
call, which is when it changes into garbage. Any idea what I'm doing wrong?