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

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

Re: [avr-gcc-list] Debugging assembly with ELF format and AVRStudio


From: Jeff Kowing
Subject: Re: [avr-gcc-list] Debugging assembly with ELF format and AVRStudio
Date: Wed, 11 May 2005 17:10:04 -0500

On Thu, 2005-05-12 at 00:16 +0300, Radu Ciurlea wrote:
> Do you really want to load the elf files in AVRStudio? I just used
> make coff
> and generated a cof file that was loaded w/o any problems. The coff
> target should be supplied in the sample makefile that ships with WinAVR.
> Will that help?
> 
> Regards,
> Radu

Well, I'm afraid I'm not having much luck :-(.  I would be happy
enough to use COFF, but I can't even get that to work.  Well,
actually, I can get the COFF (coff-avr-ext format) to load in
AVRStudio but I still can't get it to show the source code.  Do you
actually see your source file in AVRStudio (using 4.11 SP2)?  I would
love to see your example.

Here are my steps if it helps to see what stupid thing I'm doing
wrong.  Clearly something seems wrong from the messages emitted during
the objcopy step.

This is my ultra-complex assembly program, in a file named "simple_s.s":

        .text
        .global main
main:   
        jmp     work

        .stabs  "",100,0,0,work
        .stabs  "simple_s.s",100,0,0,work
        .global work
        .func work
work:
        ldi     r16, 0x1        
        out     0x18, r16
        jmp     work
        .endfunc

Note that the .stabs directives come from the recipe given at:
http://lists.gnu.org/archive/html/avr-gcc-list/2004-01/msg00074.html

I create the coff binary as follows:

$ avr-as -mmcu=atmega128 --gstabs simple_s.s -o simple_s.o

$ avr-gcc -mmcu=atmega128 -Wl,-Map=./build/simple_s.map,--cref
simple_s.o --output simple_s.elf

$ avr-objcopy --debugging --change-section-address .data-0x800000 --
change-section-address .bss-0x800000 --change-section-
address .noinit-0x800000 --change-section-address .eeprom-0x810000 -O
coff-ext-avr simple_s.elf simple_s.cof
Discarding local symbol outside any compilation
unit: .__do_copy_data_start
Discarding local symbol outside any compilation
unit: .__do_copy_data_loop
Warning: file simple_s.s not found in symbol table, ignoring
Warning: file simple_s.s not found in symbol table, ignoring
Warning: ignoring function work() outside any compilation unit

And when I load it into AVRStudio I get:
Coordinator The object file does not contain source code information.

Regards,
Jeff






reply via email to

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