mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-27 13:03:51 +00:00
FreeRTOS: Make the default stack alignment 16 for Xtensa
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
#include "port_systick.h"
|
||||
#include "esp_memory_utils.h"
|
||||
|
||||
|
||||
_Static_assert(portBYTE_ALIGNMENT == 16, "portBYTE_ALIGNMENT must be set to 16");
|
||||
|
||||
/* ---------------------------------------------------- Variables ------------------------------------------------------
|
||||
*
|
||||
@@ -284,13 +284,17 @@ StackType_t *pxPortInitialiseStack(StackType_t *pxTopOfStack, TaskFunction_t pxC
|
||||
*/
|
||||
|
||||
UBaseType_t uxStackPointer = (UBaseType_t)pxTopOfStack;
|
||||
configASSERT((uxStackPointer & portBYTE_ALIGNMENT_MASK) == 0);
|
||||
|
||||
// Initialize GCC TLS area
|
||||
uint32_t threadptr_reg_init;
|
||||
uxStackPointer = uxInitialiseStackTLS(uxStackPointer, &threadptr_reg_init);
|
||||
configASSERT((uxStackPointer & portBYTE_ALIGNMENT_MASK) == 0);
|
||||
|
||||
// Initialize the starting interrupt stack frame
|
||||
uxStackPointer = uxInitialiseStackFrame(uxStackPointer, pxCode, pvParameters, threadptr_reg_init);
|
||||
configASSERT((uxStackPointer & portBYTE_ALIGNMENT_MASK) == 0);
|
||||
|
||||
// Return the task's current stack pointer address which should point to the starting interrupt stack frame
|
||||
return (StackType_t *)uxStackPointer;
|
||||
//TODO: IDF-2393
|
||||
|
||||
Reference in New Issue
Block a user