Added a simple stack size analysis functionality to be compiled in on demand by defining STACK_SIZE to the same value as __STACK_SIZE__ in the linker config file.

Because Contiki makes intensive use of global and static variables instead of automatic variables (and parameters) the linker config files for the cc65-based targets define a way to large stack size. Reducing that is a _VERY_ low hanging fruit to get more free memory.

The Apple2 targets seem to need only about 100 bytes of stack. The Apple2 C-Library uses a 65 byte stack buffer for file name handling so I'm quite confident that other cc65-based targets need even less stack memory.
1 file changed
tree: e8ef1fc87d8d96ff7c1af7f00c00ae5788ae2d22
  1. contiki-apple2/