How to increase Main stack size

I have tried the mbed_app.json but it didn’t seem to do anything, perhaps not compatible with Arduino compiler.

What is the proper way to increase the main stack size when using rtos to utilize multi-thread? I get stack overflow error for the main thread. Currently i’m creating/using another thread, which I can set the stack size, but this seems messy.

Thank you for your help.

Hjy

Do you use the Sparkfun library or the AmbiqSDK?

In the case of Sparkfun, did you rebuild the libmbed-os.a? Look at https://github.com/sparkfun/Arduino_Apollo3/issues/311

Also, look at https://github.com/sparkfun/Arduino_Apollo3/issues/278. The changes in mbed_app.json are NOT included in a static library, so you have to apply them differently / directly in different files.