|
From: | John Regehr |
Subject: | RE: [avr-gcc-list] when is it safe to use -mtiny-stack |
Date: | Mon, 6 Apr 2009 13:47:27 -0600 (MDT) |
User-agent: | Alpine 1.00 (DEB 882 2007-12-20) |
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?
Can I have source code for the program we are talking about? I'm working on a stack analyzer. Currently it does not support the tiny-stack case but certainly that would be nice.
John Regehr
[Prev in Thread] | Current Thread | [Next in Thread] |