SVC call in vPortStartFirstTask causes Hardfault

amiller2 wrote on Tuesday, September 25, 2018:

I’m running a FreeRTOS test application that I’ve written for a Cortex-M3 device.

I’m having an issue where, on starting the scheduler, the SVC instruction at the end of vPortStartFirstTask causes a Hardfault exception.

I have a breakpoint in vPortSVCHandler and I can see that this is never entered: the execution seems to jump straight to the hardfault handler on execution of the ‘svc 0’ instruction at the end of vPortStartFirstTask from portasm.s.

I’ve seen a few descriptions of similar issues, but haven’t yet been able to determine the cause of this. Any help much appreciated.

rtel wrote on Tuesday, September 25, 2018:

Duplacate of https://sourceforge.net/p/freertos/discussion/382005/thread/c486561861/