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

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

[avr-gcc-list] avr-ext-coff and hex output different


From: Reza Naima
Subject: [avr-gcc-list] avr-ext-coff and hex output different
Date: Fri, 27 Jun 2003 03:50:32 -0700
User-agent: Mutt/1.4i

Although I didn't succeed at using the avr-coff output of Joerg's
modified objcopy with avrstudio 3, I did succeed with avr-ext-coff and
the latest avrstudio 4.  I'm using the atMega64 and I can't find any
tools to program it from within linux, so I'm forced to create a hex
file and use avrstudio 4.  However, I get very different results when I
use the coff file vs. the hex file to program the uC.   

I've read the code off the uC in both cases and saved them to hex files

http://www.reza.net/misc/code-cof.hex  - used coff file to program
http://www.reza.net/misc/code-hex.hex  - used hex file to program

The following command was used to generate the coff file : 

%.cof: %.elf
        /usr/local/src/binutils-2.13.2/binutils/objcopy --debugging \
        -O coff-ext-avr \
        --change-section-address .data-0x800000 \
        --change-section-address .bss-0x800000 \
        --change-section-address .noinit-0x800000 \
        --change-section-address .eeprom-0x810000 \
        $< $@

The following command is used to generate the hex file (uses GNU objcopy
030512 2003051) : 

%.hex: %.elf
        $(OBJCOPY) -j .text -j .data -j .bootloader -O ihex $< $@


it seems like there are two differences.  First off, the .bootloader
section is not included in the coff file.  I'm not sure if I need to
specify a change-section-address or something else to make this work.
But that aside (it's the code in main() that's not working properly), 
there is a segment of code missing from the coff file (end of the main
segment of code) :  

HEX : 

:10029000CDBFDF91CF910895496E697469616C6932
:1002A0007A65640A00427574746F6E203220507251
:1002B00065737365640D0A00FFFFFFFFFFFFFFFF1B

COFF : 

:10029000CDBFDF91CF910895FFFFFFFFFFFFFFFF6D
:1002A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5E
:1002B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4E

I havn't done any investigation beyond this, but I thougt I would send
out my early results.


-Reza
file format. 


reply via email to

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