does anyone know why the return value of `uxTaskGetStackHighWaterMark()` for main task can be higher than the "Main task stack size" set in sdkconfig?
In my `sdkconfig`:
Common ESP-related -> Main task stack size: 20000
Here is my `main.c`:
- #include <stdio.h>
- #include "freertos/FreeRTOS.h"
- #include "freertos/task.h"
- #include "esp_system.h"
- #include "esp_spi_flash.h"
- void app_main()
- {
- printf("stackHWM: %d\n", uxTaskGetStackHighWaterMark(NULL)); // in console: stackHWM: 20024
- }
The value is even higher if the "Optimization Level" is set to `Debug (-Og)`.
idf version: 4.0