> -----Original Message-----
> From: 
> avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.org 
> [mailto:avr-gcc-list-bounces+eric.weddington=atmel....@nongnu.
> org] On Behalf Of Vaclav Peroutka
> Sent: Monday, September 14, 2009 10:33 PM
> To: avr-gcc-list@nongnu.org
> Subject: [avr-gcc-list] Linker options to report RAM overflow
> 
> Hello all,
> 
> today I did some experiments with long buffers and 
> accidentally set buffers longer than 1kB on ATMEGA16. The 
> only visible problem was that printf() stopped working. One 
> hour later I noticed that I have too long buffers.
> 
> Can I force linker to shout in such situation ?
> 

Take a look at the first diagram on this page in the avr-libc user manual:
http://www.nongnu.org/avr-libc/user-manual/malloc.html

The stack grows downwards, and there is no way to set in the toolchain a bottom 
value to that stack. Also, if you use dynamic memory allocation (malloc) the 
heap grows upward, again without a preset boundary. This means that there is 
not a way that the toolchain will know that there is a stack overflow, or data 
overflow, because that is only discovered at run-time.


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to