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

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

Re: [avr-gcc-list] avr-as and symbolic debugging in AVR Studio 4


From: E. Weddington
Subject: Re: [avr-gcc-list] avr-as and symbolic debugging in AVR Studio 4
Date: Thu, 14 Aug 2003 22:19:31 GMT

> 
> Has anyone been able to symbolically debug avr-as 
assembled files in AVR
> Studio 4?  I'm using the WinAVR binutils avr-objcopy that 
converts from
> elf to coff file formats. I've looked at the .stab 
sections of the file
> and they look ok. But objcopy complains about a number of 
things. 
> 
> Here's the file I'm assembling:
> 
>       
>       .file   "demo.s"
>       
>       .stabs  "f:/temp/",100,0,0,Foo
>       .stabs  "demo.s",130,0,0,0
>       
>       .section  .text
> 
>       .func   Foo
>       .global Foo
>       
> Foo:
>         cli
>         rjmp    Foo
>         
>       .endfunc
>       
> 
> Using the command:
> 
> avr-as --gstabs -a -mmcu=atmega16 -o demo.o demo.s
> 
> Output from the assembler looks fine, but when I run 
objcopy, I get the
> following error:
> 
> F:\Temp>avr-objcopy --debugging -O coff-ext-avr demo.o 
demo.coff
> Warning: file f:/temp/ not found in symbol table, ignoring
> Warning: ignoring function Foo() outside any compilation 
unit
> 
> 
> Anyway, I'm at wit's end. If anyone can help, I'd 
appreciate it.
> 
> Thanks
> 
> -brian
> 

According to the AVR COFF Beta readme, you're supposed to 
convert the *linked ELF file* to COFF, not the object file 
(demo.o). The readme also states that to convert to COFF, 
the command line is:

avr-objcopy \
        --debugging \
        -O $(FORMAT) \
        --change-section-address .data-0x800000 \
        --change-section-address .bss-0x800000 \
        --change-section-address .noinit-0x800000 \
        --change-section-address .eeprom-0x810000 \
        $(filename).elf $(filename).cof

where $(FORMAT) should be "coff-ext-avr" in your case, and 
$(filename) of course would be "demo".

The sample makefile that comes with the AVR COFF Beta 
package contains targets to automatically do this 
conversion. You can use this makefile for your project and 
after "make all" to build the project you can use "make 
extcoff" to build the Extended COFF from the ELF file.

Try this and see if this helps. Note that the author of the 
ELF to COFF conversion, Joerg Wunsch, is on holiday until 
August 23.

Eric






reply via email to

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