AVR32 GCC default linker stack size

occam49 wrote on Tuesday, October 27, 2009:

Is the default stack that is defined by the linker script in-play after FreeRTOS starts? Or, can it be reduced to free up some RAM as it is 4K by default.?

edwards3 wrote on Tuesday, October 27, 2009:

Normally the stack set up in the linker script is only used before the scheduler is started, although in some ports it is also used by interrupt service routines. Don’t know for sure on the AVR32 though, but in any case 4K would seem excessive.

occam49 wrote on Wednesday, October 28, 2009:

I reduced the default GCC stack to 1K by altering the linker script and it appears to be fine.  It looks like the code executed by my program prior to starting the scheduler only uses about 352 bytes of stack max.  This freed up 3K more RAM.