mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
freertos: ensure the interrupt stack is aligned
CONFIG_FREERTOS_ISR_STACKSIZE was set to 2100 when ELF core dump was enabled, which resulted in a non-16-byte-aligned interrupt stack offset. This triggered "is SP corrupted" check in the backtrace, terminating the backtrace early. Fix the default value, and make sure that the stack is always aligned, regardless of the value of CONFIG_FREERTOS_ISR_STACKSIZE.
This commit is contained in:
parent
481409ec05
commit
4e7e8598f3
@ -174,8 +174,8 @@ menu "FreeRTOS"
|
|||||||
|
|
||||||
config FREERTOS_ISR_STACKSIZE
|
config FREERTOS_ISR_STACKSIZE
|
||||||
int "ISR stack size"
|
int "ISR stack size"
|
||||||
range 2100 32768 if ESP32_COREDUMP_DATA_FORMAT_ELF
|
range 2096 32768 if ESP32_COREDUMP_DATA_FORMAT_ELF
|
||||||
default 2100 if ESP32_COREDUMP_DATA_FORMAT_ELF
|
default 2096 if ESP32_COREDUMP_DATA_FORMAT_ELF
|
||||||
range 1536 32768
|
range 1536 32768
|
||||||
default 1536
|
default 1536
|
||||||
help
|
help
|
||||||
|
@ -196,10 +196,16 @@ int xt_clock_freq(void) __attribute__((deprecated));
|
|||||||
#define configIDLE_TASK_STACK_SIZE CONFIG_FREERTOS_IDLE_TASK_STACKSIZE
|
#define configIDLE_TASK_STACK_SIZE CONFIG_FREERTOS_IDLE_TASK_STACKSIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The Xtensa port uses a separate interrupt stack. Adjust the stack size */
|
/* Stack alignment, architecture specifc. Must be a power of two. */
|
||||||
/* to suit the needs of your specific application. */
|
#define configSTACK_ALIGNMENT 16
|
||||||
|
|
||||||
|
/* The Xtensa port uses a separate interrupt stack. Adjust the stack size
|
||||||
|
* to suit the needs of your specific application.
|
||||||
|
* Size needs to be aligned to the stack increment, since the location of
|
||||||
|
* the stack for the 2nd CPU will be calculated using configISR_STACK_SIZE.
|
||||||
|
*/
|
||||||
#ifndef configISR_STACK_SIZE
|
#ifndef configISR_STACK_SIZE
|
||||||
#define configISR_STACK_SIZE CONFIG_FREERTOS_ISR_STACKSIZE
|
#define configISR_STACK_SIZE ((CONFIG_FREERTOS_ISR_STACKSIZE + configSTACK_ALIGNMENT - 1) & (~(configSTACK_ALIGNMENT - 1)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Minimal heap size to make sure examples can run on memory limited
|
/* Minimal heap size to make sure examples can run on memory limited
|
||||||
|
Loading…
x
Reference in New Issue
Block a user