Skip to content

Commit c316e4c

Browse files
committed
Increase main stack size to 32k
1 parent e832f63 commit c316e4c

File tree

7 files changed

+6
-6
lines changed

7 files changed

+6
-6
lines changed

mbed-os-to-arduino

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ export ARDUINOCORE=$MBED_CORE_LOCATION/variants/$BOARDNAME/
2626
mbed target $BOARDNAME
2727
mbed toolchain GCC_ARM
2828
echo -e "#include \"mbed.h\"\nint main() {Thread thd;}" > main.cpp
29-
echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_ENABLED=1\",\n\"MBED_MEM_TRACING_ENABLED=1\"\n],\n\"target_overrides\": {\n \"*\": {\n\"platform.stdio-buffered-serial\": true,\n\"platform.stdio-baud-rate\": 115200,\n\"platform.default-serial-baud-rate\": 115200\n}\n}\n}\n" > mbed_app.json
29+
echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_ENABLED=1\",\n\"MBED_MEM_TRACING_ENABLED=1\"\n],\n\"target_overrides\": {\n \"*\": {\n\"platform.stdio-buffered-serial\": true,\n\"rtos.main-thread-stack-size\": 32768,\n\"platform.stdio-baud-rate\": 115200,\n\"platform.default-serial-baud-rate\": 115200\n}\n}\n}\n" > mbed_app.json
3030

3131
if [ $BOARDNAME == "ARDUINO_NANO33BLE" ]; then
32-
echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_ENABLED=1\",\n\"MBED_MEM_TRACING_ENABLED=1\"\n],\n\"target_overrides\": {\n \"*\": {\n\"platform.stdio-buffered-serial\": true,\n\"platform.stdio-baud-rate\": 115200,\n\"platform.default-serial-baud-rate\": 115200,\n\"target.mbed_app_start\": \"0x10000\"}\n}\n}\n" > mbed_app.json
32+
echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_ENABLED=1\",\n\"MBED_MEM_TRACING_ENABLED=1\"\n],\n\"target_overrides\": {\n \"*\": {\n\"platform.stdio-buffered-serial\": true,\n\"platform.stdio-baud-rate\": 115200,\n\"platform.default-serial-baud-rate\": 115200,\n\"rtos.main-thread-stack-size\": 32768,\n\"target.mbed_app_start\": \"0x10000\"}\n}\n}\n" > mbed_app.json
3333
fi
3434

3535
rm -rf BUILD
@@ -72,4 +72,4 @@ Using Arduino as an mbed library
7272

7373
echo -e "arduino/cores/arduino/main.cpp\n arduino/cores/arduino/mbed/\narduino/libraries/" > .mbedignore
7474
#add ARDUINO_AS_MBED_LIBRARY=1 to macros section in mbed_app.json
75-
echo "https://github.com/arduino/ArduinoCore-mbed#bf6e64771ebe20285b0364756dff856ebbc679dc" > arduino.lib
75+
echo "https://github.com/arduino/ArduinoCore-mbed#bf6e64771ebe20285b0364756dff856ebbc679dc" > arduino.lib
394 KB
Binary file not shown.

variants/ARDUINO_NANO33BLE/mbed_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE 512 // set by library:rtos
230230
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_DEBUG_EXTRA 0 // set by library:rtos
231231
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_TICKLESS_EXTRA 256 // set by library:rtos
232-
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 4096 // set by library:rtos
232+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 32768 // set by application[*]
233233
#define MBED_CONF_RTOS_PRESENT 1 // set by library:rtos
234234
#define MBED_CONF_RTOS_THREAD_STACK_SIZE 4096 // set by library:rtos
235235
#define MBED_CONF_RTOS_TIMER_THREAD_STACK_SIZE 768 // set by library:rtos

variants/ENVIE_M4/libs/libmbed.a

393 KB
Binary file not shown.

variants/ENVIE_M4/mbed_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE 512 // set by library:rtos
186186
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_DEBUG_EXTRA 128 // set by library:rtos[STM]
187187
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_TICKLESS_EXTRA 256 // set by library:rtos
188-
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 4096 // set by library:rtos
188+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 32768 // set by application[*]
189189
#define MBED_CONF_RTOS_PRESENT 1 // set by library:rtos
190190
#define MBED_CONF_RTOS_THREAD_STACK_SIZE 4096 // set by library:rtos
191191
#define MBED_CONF_RTOS_TIMER_THREAD_STACK_SIZE 768 // set by library:rtos
416 KB
Binary file not shown.

variants/MBED_CONNECT_ODIN/mbed_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE 512 // set by library:rtos
210210
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_DEBUG_EXTRA 128 // set by library:rtos[STM]
211211
#define MBED_CONF_RTOS_IDLE_THREAD_STACK_SIZE_TICKLESS_EXTRA 256 // set by library:rtos
212-
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 4096 // set by library:rtos
212+
#define MBED_CONF_RTOS_MAIN_THREAD_STACK_SIZE 32768 // set by application[*]
213213
#define MBED_CONF_RTOS_PRESENT 1 // set by library:rtos
214214
#define MBED_CONF_RTOS_THREAD_STACK_SIZE 4096 // set by library:rtos
215215
#define MBED_CONF_RTOS_TIMER_THREAD_STACK_SIZE 768 // set by library:rtos

0 commit comments

Comments
 (0)