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

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

[avr-gcc-list] atmega323 emulation


From: Ted Larsson
Subject: [avr-gcc-list] atmega323 emulation
Date: Wed, 3 Apr 2002 11:28:07 +0200
User-agent: Mutt/1.3.28i

Hello again,

I have been harassing you all for the last few days, and
here comes another message. ;)

I have had trouble to debug code on the atmega323 running on
the stk500 board. I want to debug it using atmel's jtag-ice. 

Avr-gcc seems to generate correct code, but I don't
understand exactly what happens in all the internals of the
gcc colleection of programs. As I said, code seems to be
generated correctly, but debug info seems to get corrupted
somewhere on the way to a final coff file, as I tried to
explain in my last mail. 

For the 8515 it works ok, though, so I suspect that there is
some work to be done in a few files inisde gcc, but I don't
know which ones... I searched the archives of this mailing
list and found a few pointers, but they "only" got me as far
as building code without errors. I am using -mmcu=atmega32
and Wl,-T,m323.x,-m,avrmega161, as suggested by Marek
Michalkiewicz in a mail on Nov 7th 2001. m323.x is a copy of
avrmega161.x where I changed LENGTH of text, data and eeprom
to 32K, 2K an d 1K, respectively. I also changed the last
line to __stack = 0x85F. 

What else do I need to do? I suspect that it is the
avrmega161 line that messes things up, but I am not sure.
Has anyone succeeded with "live" debugging with the jtag-ice
on the 323 using avr-gcc/avr-studio? Pointers in the right
direction would be greatly appreciated.

Also, I have recently changed to the avrfreaks windows
version of gcc. At first, I had thought that compiling the
sources on cygwin would be better, since they are ahead of
the avrfreaks/windows distribution by almost half a year or
so, but this compiler suite generated code that resulted in
coff files which crashed avr studio. :(  Is there a lot of
difference between 3.0.2 (avrfreaks) and 3.0.4 (latest
source)?

Cheers,

/Ted
avr-gcc-list at http://avr1.org



reply via email to

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