rtel wrote on Tuesday, January 17, 2006:
I would expect to get it under that, but have not tried.
The lwIP task has a stack size of 600*4 bytes,
The WebSvr task stack has a size of 250*4 bytes, and
The ETH_INT task stack has a size of 350*4 bytes.
If you have removed all the other demo tasks you are left with the idle task stack (small) and a few queues, TCB, etc. 10000 would seem more than enough. Maybe there is a large queues used by the lwIP code somewhere, can’t remember.
The FreeRTOS kernel itself tries where possible not to use too much stack. The lwIP code uses standard libraries (not efficient in GCC, but better if you are using Rowleys build), and is outside of the FreeRTOS kernel and therefore does not have the same design goal. This is the reason for the 600*4 stack used by the lwIP task.
I would suggest setting a break point in the function pvPortMalloc() in the file heap_2.c. When the execution breaks here you can inspect the xWantedSize value (the number of bytes being obtained), and see when large chunks of memory are being allocated and why. This will assist in diagnosis.
Are you using command line GCC or Rowley?