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: Henrik Maier
Subject: Re: [avr-gcc-list] WinAVR - gcc 3.4.6 - AVR Studio - DuoCore PC - Stackpointer problem
Date: Wed, 22 Nov 2006 09:29:46 +1000
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

The issue may not relate to your build environment. Are you using external RAM with the AT90CAN128? If yes, make sure the SP never points to external RAM as the silicon has a bug which can cause corruption of the stack. Refer to datsheet Errata Rev C: "Miss-functioning when code stack is in XRAM"

Henrik Maier

Steffen Rose wrote:
Hello,

our Sourcecode compiled on different PCs with WinAVR works correctly. But we have one PC, where compiled the same Source, the binary is corrupt. If this binary flashed on a AT90CAN128, the Stackpointer Highbyte will corrupt anytime.

On the same binary the problem is after the same actions. After little changes the needed actions are different. Every time on debugging the problem is after a function entry if the Stack frame for the local variables will calculate. Y is correct (AVR Studio syntax - frame pointer), SPH is wrong.

The PC is an DuoCore PC. The corrupt compilation is done with the AVR Studio IDE and WinAVR with avr-gcc 3.4.6.

The working compilation is done on "SingleCore" PCs with cygwin make (complete cygwin, not the minimal version from WinAVR).

The Option -O0 and -Os with and without -mcall-prologues have the same effect in this case.

Code generation depend options:
-mmcu=at90can128 -std=gnu99 -Os -mcall-prologues -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums

Have anyone see a similar problem and can give a hint, what we can check?



--

Henrik
http://www.proconx.com





reply via email to

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