Extracting data from Atmel AVR8/16 .elf project
Before you start:
If you already didn't do that, install the WinAVR software, which can be downloaded from: http://sourceforge.net/projects/winavr/files/WinAVR/
Without this software you won't be able to extract the data from your project file.
Step by step manual
STEP-01
Run command prompt


STEP-02
Please note, fact that our example is located in the directory “avrworkspace” does not mean, that your project has to be located in the same directory “avrworkspace”.
STEP-03
![]() | Using the command “avr-readelf -l <project_name.elf>” you can display the program headers and section's header stored in the project file. |
STEP-04
![]() | use command “avr-objcopy -O binary -j .text <project_name.elf> flash.bin” |
STEP-05
![]() | use command “avr-objcopy -O binary -j .eeprom <project_name.elf> eeprom.bin” |
STEP-06
![]() | use command “avr-readelf -x .fuse <project_name.elf>” |
STEP-07
![]() | use command “avr-readelf -x .lock <project_name.elf>” |
STEP-08
Erase the whole buffer.

STEP-09
Load EEPROM data

STEP-10
Load Flash Data.

STEP-11
Set the correct fuse bit settings.

STEP-12
Set the correct Lock settings.

Presov, January 2012
Update: April 2015
Author: Jan Drab, Elnec
Return to Application notes