[En-Nut-Discussion] [Understand compilation process] avr-objcopy -R .eeprom

Rodrigue rodrigue.roland at gmail.com
Mon Feb 19 02:31:24 CET 2007


Hello,

When I compile "simple" project. The following commands are executed:
avr-objcopy -R .eeprom -O ihex simple.elf simple.hex
avr-objcopy -O binary simple.elf simple.bin

The first command removes the .eeprom section form simple.elf and converts
the rest of the file in ihex format (is it Intel Format?). Why remove this
section? How to write the eeprom section? If I have a variable like this in
my software:
static const char my_string[] __attribute__ ((section(".eeprom"))) = "This
data will be loaded into EEPROM";
What's happening?

The second command converts simple.elf file in binary format which is not
used after, so I don't understand why it's generated?
make -k burn 
avrdude -p atmega128 -P com1 -c stk500v2 -V -U flash:w:simple.hex 

Thanks in advance!
Rodrigue

-- 
View this message in context: http://www.nabble.com/-Understand-compilation-process--avr-objcopy--R-.eeprom-tf3250513.html#a9036029
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.




More information about the En-Nut-Discussion mailing list