[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] when is it safe to use -mtiny-stack
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] when is it safe to use -mtiny-stack |
Date: |
Mon, 6 Apr 2009 06:25:32 -0600 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of address@hidden
> Sent: Sunday, April 05, 2009 2:30 PM
> To: address@hidden
> Subject: [avr-gcc-list] when is it safe to use -mtiny-stack
>
>
> I have an ATmega3290P app that I am trying to optimize for size.
> I find that using the -mtiny-stack option gives me the last
It's not safe at all. The 3290P has 2K of RAM which gets used for static
variables, stack space and heap (if you use dynamic memory allocation).
-mtiny-stack will cause the compiler to only change the lowest 8-bits of the
stack, which means that you effectively only have a 255 byte stack. Can you
guarantee that your application does not use any more stack space than this? Do
you have complete code coverage in your testing to prove this?
And please subscribe to the list so your messages don't have to be approved.