Hi, I don’t understand why are we restoring the main stack pointer in vPortStartFirstTask(IAR M3 PORT) its the same on other tool-chains as well.
Doesn’t resetting the SP to c_stack pointer corrupt the main()'s stack?
I’m trying to port FreeRTOS to c++. The above operation is corrupting my stack and objects on main()'s stack are no longer usable after a call to scheduler start.