I am trying to run FreeRTOS on CM33 in this facing an issue at the end of vRestoreContextOfFirstTask while trying to jump at EXC_RETURN (0xFFFFFFBC) which is leading to an Exception.
So can anyone, please help me understand how after this function control will jump to task's definition.
Cortex-M uses special values in the LR to return from an exception. This is also used to swap in a task. Check the Armv8-M manual if this value is correct. One issue might be the you run in normal mode and want to change to secure mode.
I met same issue. It looks like a bug of portasm.s.
when configENABLE_MPU == 0, not all registers poped.
The EXC_RETURN has been wrong restore to PC.
View all questions in Cortex-M / M-Profile forum