diff --git a/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h b/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h index 51cbcbce2..128d62190 100644 --- a/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h +++ b/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h @@ -181,11 +181,14 @@ int xt_clock_freq(void) __attribute__((deprecated)); #define configMAX_PRIORITIES ( 25 ) #endif -#ifndef CONFIG_APPTRACE_ENABLE -#define configMINIMAL_STACK_SIZE 768 -#else +#if defined(CONFIG_APPTRACE_ENABLE) /* apptrace module requires at least 2KB of stack per task */ #define configMINIMAL_STACK_SIZE 2048 +#elif defined(CONFIG_COMPILER_OPTIMIZATION_NONE) +/* with optimizations disabled, scheduler uses additional stack */ +#define configMINIMAL_STACK_SIZE 1024 +#else +#define configMINIMAL_STACK_SIZE 768 #endif #ifndef configIDLE_TASK_STACK_SIZE diff --git a/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 b/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 index 8c66af770..d9a3a1b05 100644 --- a/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 +++ b/tools/test_apps/system/startup/sdkconfig.ci.opt_o0 @@ -1 +1,2 @@ CONFIG_COMPILER_OPTIMIZATION_NONE=y +CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y