SV: SV: SV: SV: [Icc-avr] Stack problems

Richard Man richard-lists at imagecraft.com
Fri Aug 22 02:17:44 PDT 2008


Bengt, the map file summary says you have 994 bytes SW stack.  A 
reasonable thing to do is to give yourself a reasonable margin, e.g. 
it should not be rocket science to keep your local variable usage 
down to about 500 bytes. If you are creeping up to 900 bytes mark, 
and honestly, how many nested functions are you writing? It should be 
fairly easy for YOU, the programmer, to make an estimate. Anyway, if 
you are creeping toward the full size, then obviously you will need 
to do more careful study.

I don't see why the compiler has to do heroic when you can do a 
simple job of better estimating. You know not to blow the current 
requirement of an IO pin, so why not know the limitations of the 
memory constraints?


At 01:45 AM 8/22/2008, Bengt Ragnemalm wrote:
>I understand the problem that only generating obvious errors could give you
>a false safety but all errors that can be generated is good errors in my
>point of view.
>
>I still feel a little lost in what to do to check that I do not use too many
>local variables.
>
>The example below will be the same regardless if the array is used in a
>function or in main.

// richard (This email is for mailing lists. To reach me directly, 
please use richard at imagecraft.com) 



More information about the Icc-avr mailing list