[Top][All Lists]

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

Re: [avr-gcc-list] Re: Yet another Avr-gcc_Simulavr_Avr-Gdb_DDD-howto,

From: Erik Christiansen
Subject: Re: [avr-gcc-list] Re: Yet another Avr-gcc_Simulavr_Avr-Gdb_DDD-howto, Was: Re: avr-libc install problem
Date: Tue, 19 Aug 2003 19:43:48 +1000
User-agent: Mutt/1.3.28i

On Tue, Aug 19, 2003 at 06:32:44PM +1000, Terry Porter wrote:
> You need to use the "-g" option with avr-gcc to include debugging info
> in the elf file.

   So far, I've been using:

avr-gcc -c -g -x assembler-with-cpp -mmcu=atmega16 -DMCU=atmega16 init.s io.s
avr-ld  -T ld.lnk -o app.elf init.o io.o

   (Granted, removing -c would obviate the need for line two, but old
   habits die hard. I'm not yet ready to surrender linking for embedded
   targets to invisible linker scripts and gcc hocus pocus.)

   $ nm app.elf
   lists only 23 symbols, so it seems something more is needed for all
   the symbols from included header files to hitch a ride. (Tried
   letting gcc link, just for fun, but it complained about a missing

   I've often used -M with ld, for a complete link map, but IIRC the
   symbols had to be global to show up. So how to get r16, SP, SPH, etc.
   to gdb is still the mystery.

> Do you have a .gdbinit in the io.elf directory configured as the docs suggest 
> ?

   Duh! Yes, how else will it know?

   $ more .gdbinit 
   echo (gdb) target remote localhost:1212
   target remote localhost:1212
   echo (gdb) load

   leads to: "Connection opened by host, port 1618."

   OK, stand by for wetware reboot:
   Loading ddd info page instead of gdb.
   Fetching more coffee.

   Thanks for that, Terry.


reply via email to

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