In the GCC ARM EBI is defined, that the stack by the call of a C-Functions need to by aligment to 8Byte. When I check the FreeRTOS_IRQ_Handler in the portASM.S of Cortex A9, this is done for the call of the vApplicationIRQHandler.
Why isn’t this done for the call of the functions vTaskSwitchContext? Is there a reason?
For me should this done like this.
/*8 Byte stack alignment */
MOV r2, sp
AND r2, r2, #4
SUB sp, sp, r2
LDR R0, vTaskSwitchContextConst
/* The stack alignment doesn’t need to restored, the after this will in anycase a new stack loaded */