How to increase Main stack size

Do you use the Sparkfun library or the AmbiqSDK?

In the case of Sparkfun, did you rebuild the libmbed-os.a? Look at

Also, look at The changes in mbed_app.json are NOT included in a static library, so you have to apply them differently / directly in different files.