avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] WinAVR - gcc 3.4.6 - AVR Studio - DuoCore PC - Stackp


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] WinAVR - gcc 3.4.6 - AVR Studio - DuoCore PC - Stackpointer problem
Date: Sat, 25 Nov 2006 23:15:54 +0100 (MET)

Steffen Rose <address@hidden> wrote:

> wrong code:
>       PUSH R17
>       PUSH R28
>       PUSH R29
>       IN R30,0x3D
>       IN R31,0x3E
>       SUBI R30,0x4A
>       SBCI R31,0x10
>       STD Z+0,R1
>       LDS R24,0x500
>       TST R24
>       BREQ PC+0x03
>       CALL 0x12A

> The Subtraction 0x104A from the Stackpointer is very high.

That would suggest you've been declaring a *lot* of local variables.

Is this perhaps without optimization (-O0), and the other case uses
optimizations?  In that case, it's possible the compiler optimized all
your local variables away because they are not needed.  But still, the
error is in your code if you are trying to reserve more variables than
you've got RAM (stack in that case) available.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]