Thanks for the reply. I jknow for mBed OS threads created by my own software, I have to define the stack size in code, for example
rtos::Thread TMP117_Thread(osPriorityNormal, 1600L);
I dump the stack info of all the running threads in my application, and I believe the lwip thread is the culprit (it is defined as 1200 bytes in the header files), it is always maxed out at 1200 (see first one in the list below). It is possible that only exactly 1200 bytes are required, but I am very suspicious that that is not the case.
I had pointed this out to Arduino support in release 3.2, and was hoping 3.3.0 would have corrected it, but it did not.
My own threads are all comfortably below the allotted amount of stack. I also wanted to be able to decrease the main thread stack size, as it defaultrs at 32k, which is way too much for my purpose.
I looked at the linker_script.ld files in my 3.3.0 directories, and unfortunately, I do not see anything that allows me to alter the individual thread stack sizes.
Heap Cur=63369 Heap Res=435776 Heap max=67741
uptime (days:hh:mm:ss) = 0:02:19:40
Thread: 0x2400f970, Stack size: 1200, Max stack: 1200
Thread: 0x24024500, Stack size: 4096, Max stack: 928
Thread: 0x24006c04, Stack size: 896, Max stack: 328
Thread: 0x24003434, Stack size: 4400, Max stack: 1952
Thread: 0x240122f8, Stack size: 2048, Max stack: 320
Thread: 0x240041e0, Stack size: 3008, Max stack: 1360
Thread: 0x24007090, Stack size: 32768, Max stack: 8456
Thread: 0x24004320, Stack size: 4104, Max stack: 344
Thread: 0x24003740, Stack size: 2000, Max stack: 688
Thread: 0x24003378, Stack size: 2000, Max stack: 664
Thread: 0x240035cc, Stack size: 1568, Max stack: 720
Thread: 0x24003cc4, Stack size: 1600, Max stack: 600
Thread: 0x24003bf4, Stack size: 2032, Max stack: 608
Thread: 0x240030f0, Stack size: 6000, Max stack: 1440
Thread: 0x240032bc, Stack size: 2688, Max stack: 904
Thread: 0x240034f0, Stack size: 1552, Max stack: 624
Thread: 0x24003a68, Stack size: 1536, Max stack: 640
Thread: 0x240031b8, Stack size: 1584, Max stack: 704
Thread: 0x240045c4, Stack size: 2400, Max stack: 1248
Thread: 0x24006bc0, Stack size: 768, Max stack: 104
Thread: 0x24017538, Stack size: 256, Max stack: 128
Thread: 0x2400f430, Stack size: 2048, Max stack: 200