Skip to content

Commit 2082945

Browse files
authored
Make LOOP_STACK_SIZE user configurable at compile-time. (#5173)
This PR lets the user override the LOOP STACK SIZE set in sdkconfig (for example with -DARDUINO_LOOP_STACK_SIZE=12288).
1 parent 0d6b142 commit 2082945

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cores/esp32/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
#include "USB.h"
77
#endif
88

9+
#ifndef ARDUINO_LOOP_STACK_SIZE
910
#ifndef CONFIG_ARDUINO_LOOP_STACK_SIZE
10-
#define CONFIG_ARDUINO_LOOP_STACK_SIZE 8192
11+
#define ARDUINO_LOOP_STACK_SIZE 8192
12+
#else
13+
#define ARDUINO_LOOP_STACK_SIZE CONFIG_ARDUINO_LOOP_STACK_SIZE
14+
#endif
1115
#endif
1216

1317
TaskHandle_t loopTaskHandle = NULL;
@@ -48,7 +52,7 @@ extern "C" void app_main()
4852
#endif
4953
loopTaskWDTEnabled = false;
5054
initArduino();
51-
xTaskCreateUniversal(loopTask, "loopTask", CONFIG_ARDUINO_LOOP_STACK_SIZE, NULL, 1, &loopTaskHandle, ARDUINO_RUNNING_CORE);
55+
xTaskCreateUniversal(loopTask, "loopTask", ARDUINO_LOOP_STACK_SIZE, NULL, 1, &loopTaskHandle, ARDUINO_RUNNING_CORE);
5256
}
5357

5458
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy