Skip to content

Commit 7d5bf9e

Browse files
authored
[1.0.5] Make looptask stack size configurable (espressif#4564)
Added guarded define to set the stacksize on the main looptask. Advantage of this is that build_flags can be used to provide a different value for the stack size should it be neccessary default behaviour is unaffected
1 parent aac26a4 commit 7d5bf9e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: cores/esp32/main.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
#include "esp_task_wdt.h"
44
#include "Arduino.h"
55

6+
#ifndef CONFIG_ARDUINO_LOOP_STACK_SIZE
7+
#define CONFIG_ARDUINO_LOOP_STACK_SIZE 8192
8+
#endif
9+
610
TaskHandle_t loopTaskHandle = NULL;
711

812
#if CONFIG_AUTOSTART_ARDUINO
@@ -25,7 +29,7 @@ extern "C" void app_main()
2529
{
2630
loopTaskWDTEnabled = false;
2731
initArduino();
28-
xTaskCreateUniversal(loopTask, "loopTask", 8192, NULL, 1, &loopTaskHandle, CONFIG_ARDUINO_RUNNING_CORE);
32+
xTaskCreateUniversal(loopTask, "loopTask", CONFIG_ARDUINO_LOOP_STACK_SIZE, NULL, 1, &loopTaskHandle, CONFIG_ARDUINO_RUNNING_CORE);
2933
}
3034

3135
#endif

0 commit comments

Comments
 (0)