[Icc-avr] Using to much RAM for local variables
Richard Man
richard-lists at imagecraft.com
Fri Aug 15 01:45:17 PDT 2008
There are billions problems to solve to write a compiler product.
Most are easy, some are very difficult. Solving a SPECIFIC instance
of a problem is easy, but solving a generic problem is never. To
answer your questions directly, yes, it can be solved, especially by
linker who does full call tree analysis and then layout all the SRAM
requirements, and that'd be the right way to solve it. Unfortunately,
that is not easy.
It is the same as requesting Atmel to add a "stack check"
hardware. All they need is a data break register. How hard can *that* be?
At 12:25 AM 8/15/2008, Bengt Ragnemalm wrote:
>Hi.
>
>I felled in a new pit and have just found the ladder.
>
>I use an Mega88, it has 1 k RAM. I have declared two local arrays,
>both with 512 bytes. Obviously this will not work if they are used
>simultaneously. Unfortunately they are, something I totally missed.
>But the code compiles fine and I have been a little upset struggling
>with the problem that my hardware just turned off after 90 seconds
>by it self without ever entering the POWER OFF state. The problem
>was that as soon as one of the arrays was starting to write data to
>the later sections, it instead was writing in my registers. Among
>others, the register that was controlling the power.
>
>QUESTION: Is it natural that the compiler does not generate any
>error in this situation?
>
>The actual problem should not be to difficult to solve.
>
// 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