Electronics
read more
What I learnt today...
… is that on the AVR, the “Data Memory Usage” information given by AVRGCC only refers to memory allocated at compile time, and does not take the stack into account. The stack is not to be underestimated: it holds not only the return addresses from function calls, but also all local variables of the function(s) called.
So you might feel safe and sound reading something like “Data Memory Usage : 66 bytes 51,6% Full”, thinking there’s plenty of space left for future features; and then the stack still swoops down and corrupts your precious data because of a couple of nested function calls.