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

Richard Man richard-lists at imagecraft.com
Thu Aug 21 12:41:55 PDT 2008


Currently, the compiler does not do any check on the local variables, 
because any checking would be at best a guess (unless it does full 
call tree analysis and layout all the SRAM usage). While it can 
clearly complain in the obvious cases, it will do a lousy job overall 
and then people will complain about false security.

If you look at the View->"Map File Summary" it gives you an estimate 
on how big the software stack can be. Generally speaking, you 
shouldn't be pushing the limit of the SRAM, so it should be farily 
easy for you to see what your margins are. If you are really pushing 
the limit, you would need to check and test carefully anyway.

At 05:55 AM 8/21/2008, Bengt Ragnemalm wrote:
>One more question about this.
>
>If I declare a local array that is larger than the RAM, I do not get an
>error. Is that because the compiler can not be sure that this array will
>actually be placed in RAM as it can point to anything?
>

// 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