Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Debugging gcc output with AVR studio [RSS Feed]

#1 Oct. 25, 2005 17:07:38

David B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Debugging gcc output with AVR studio


Hi,I've just downloaded the latest and greatest WinAVR 20050214 and AVRStudio (4.12 Build 452)I'm generating a .elf file with and trying to debug this in AVR studio
(using STK500) When I compile with the -gdwarf-2, it does not seem to
generate any debug information. A dwarfdump shows nothing. Compiling
with a -gstabs and the debug information is there (an see it with avr-
objdump)

Is the gcc compiled using --with-dwarf2?? If so any idea what I am
doing wrong??

Actually I came to this after trying to use avarice (complained about
innappropriate ioctl ). Avrdude totally crashes. Looking at both these
things with portmon it appears that a couple of the commands being
issued are not recognised be the STK500 firmware version 4, and version
2.01.

I think that generating an elf file with debug information is the
correct way to go from a web search. Am I correct in this assumption??

Regards

Dr David Braendler
Grey Innovation
www.greyinnovation.com
42 Charles Street Ph +613 9692 6923
Prahran Fx +613 9692 6998
Victoria 3181 Mail: PO Box 452
Australia Prahran 3181



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Oct. 25, 2005 17:59:55

Haase B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Debugging gcc output with AVR studio


Most probably, your gcc is not compiled with dwarf2 support. You have to supply
the
--with-dwarf2 configure switch. In order to find it out compile an arbitrary
source file using the switches "-S -g" the generated assembler file should have
lots of dwarf2 output
Information.

Yours,

Bjoern.

-----Urspr√ľngliche Nachricht-----
Von: Im Auftrag von David Braendler
Gesendet: Dienstag, 25. Oktober 2005 14:28
An: avr-gcc-l***@*ongnu.org
Betreff: Debugging gcc output with AVR studio

Hi,
I've just downloaded the latest and greatest WinAVR 20050214 and AVR
Studio (4.12 Build 452)

I'm generating a .elf file with and trying to debug this in AVR studio
(using STK500) When I compile with the -gdwarf-2, it does not seem to
generate any debug information. A dwarfdump shows nothing. Compiling
with a -gstabs and the debug information is there (an see it with avr-
objdump)

Is the gcc compiled using --with-dwarf2?? If so any idea what I am
doing wrong??

Actually I came to this after trying to use avarice (complained about
innappropriate ioctl ). Avrdude totally crashes. Looking at both these
things with portmon it appears that a couple of the commands being
issued are not recognised be the STK500 firmware version 4, and version
2.01.

I think that generating an elf file with debug information is the
correct way to go from a web search. Am I correct in this assumption??

Regards

Dr David Braendler
Grey Innovation
www.greyinnovation.com
42 Charles Street Ph +613 9692 6923
Prahran Fx +613 9692 6998
Victoria 3181 Mail: PO Box 452
Australia Prahran 3181



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-l***@*ongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#3 Oct. 25, 2005 19:32:36

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Debugging gcc output with AVR studio


David Braendler <> wrote:

> Is the gcc compiled using --with-dwarf2?

The WinAVR one? Yes, it is.

> Actually I came to this after trying to use avarice (complained
> about innappropriate ioctl ).

Again, on Windows? It must be a Cygwin thingie. What ioctl? Do you
have more than one cygwin*.dll?

> Avrdude totally crashes.

Can you explain more?

You're the first one to report this, and mind you, we're talking about
a version of WinAVR that has been used for several months by many,
many people yet nobody so far reported crashes and inappropriate ioctl
failures -- so I'm somewhat suspecting your Windows setup. (Whatever
it might be -- I'm not a Windows user myself.)

> Looking at both these things with portmon it appears that a couple
> of the commands being issued are not recognised be the STK500
> firmware version 4, and version 2.01.

The AVRDUDE and AVaRICE versions that came with the last version of
WinAVR are unable to handle the STK500 firmware rev 2.x, and the JTAG
ICE mkII.

AVRDUDE just released version 5.0 that is able to work with STK500 v2.
Sources can be found here:http://savannah.nongnu.org/download/avrdude/avrdude-5.0.tar.gzA Win32 binary version that might or might not work for you (just a
plain archive, no fancy installer, no uninstall support):http://savannah.nongnu.org/download/avr/avrdude-5.0-w32.zip> I think that generating an elf file with debug information is the
> correct way to go from a web search.

It's the only way that is directly supported by GCC. ;-)

In short, there are three options:

GCC Conversion Debugger

ELF with
-gstabs none AVR-GDB
-gstabs avr-objcopy -O coff-ext-avr AVR Studio (old format)
VMLAB
-gdwarf-2 none AVR Studio (new format)
(AVR-GDB, not fully
supported yet)

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#4 Oct. 26, 2005 08:35:50

Torleif S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Debugging gcc output with AVR studio


David Braendler wrote:Hi, I've just downloaded the latest and greatest WinAVR 20050214 and AVR
Studio (4.12 Build 452)
I'm generating a .elf file with and trying to debug this in AVR studio
(using STK500) When I compile with the -gdwarf-2, it does not seem to
generate any debug information. A dwarfdump shows nothing. Compiling
with a -gstabs and the debug information is there (an see it with avr-
objdump)dwarfdump does not seem to work for me either.
Try to do avr-readelf -wi yourobjectfile.elf

Torleif



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#5 Oct. 26, 2005 16:30:42

Eric W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Debugging gcc output with AVR studio


Torleif Sandnes wrote:David Braendler wrote:Hi, I've just downloaded the latest and greatest WinAVR 20050214 andAVRStudio (4.12 Build 452)
I'm generating a .elf file with and trying to debug this in AVR studio
(using STK500) When I compile with the -gdwarf-2, it does not seem to
generate any debug information. A dwarfdump shows nothing. Compiling
with a -gstabs and the debug information is there (an see it with avr-
objdump)dwarfdump does not seem to work for me either.
Try to do avr-readelf -wi yourobjectfile.elf

TorleifKnown bug: dwarfdump does not work, even though it built correctly.IIRC, I have a bug report in the WinAVR project about it, but at themoment there is no known solution.Sorry for the hassle.

Eric


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-gcc-list] Debugging gcc output with AVR studio [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support