I am running an evaluation of FreeRTOS to run a custom HW embedding Cortex-M3 core.
As my HW is not available, I used LM3S811_GCC demo as it is close to what I am targeting.
I run the demo inside Eclipse, and qemu-system-arm to avoid buying other HW and was successful in building, linking and starting the demo.
However I am getting wrong behavior when calling prvPortStartFirstTask()
when executing “svc 0” instruction, it is jumping onto vPortSVCHandler as expected.
However, at that point
lr = 0xFFFFFFF9
whereas before that instruction, I had
lr = 0x0000079F
Note that I get LR being at that value upon breakpoint onto vPortSVCHandler, as for some reason the debugger seems to be puzzled by “svc 0” call.
As such, when executing :
“bx lr” in the vPortSVCHandler, I am getting the UsageFault exception
I would like to know if I am doing anything wrong, I did not make any specific changes compared to initial demo.
From ARM instruction set, I don’t see why LR is changing.
Although I am out of usual FreeRTOS bounds with my QEMU emulation, I would appreciate any help regarding this issue. Could that come from emulation itself ?