elf and eep file merging

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

we are using atmel studio 7.0.1931, tried to merg elf and eep file but not  worked.

 

HOW to generate/merge elf and eep to get elf file in command prompt? 

Varun

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your title/question don't make a lot of sense.

 

The way the GCC build works is that the final build output is an ELF file. It is a multi-section file with ALL the generated data from the build. It has sections for .text (flash content), .data (inital variable values - also required in flash), .eeprom (EEPROM contents), .fuse (the fuse bits), .lock (lock bits)

 

Later in the build avr-objcopy is run twice. On one occasion it is directed to "extract load modules" but at this time either -j is used to say "this, this and this" or -R is used to say "evreything but this, this and this". What it actually copies is .text+.data and it uses these to create elfname.HEX which is the contents of the flash. Then avr-objcopy is run a second time and this time it is told "extract just the .eeprom section contents and create a second Intel Hex file only call it elfname.EEP"

 

So your "merge ELF & EEP" does not make much sense - the EEPROM contents are already in the ELF, (as section .eeprom) - they were then extracted to make the EEP. So there'd be no point tryiing to merge it back in.

 

When you come to program an AVR you have two options. You can either do several ISP steps where you program the HEX (flash), the EEP (EEPROM) and then the fuse and the lock bits all separately. The alternative is that many program systems can now accept an ELF as input and they will program everything (flash, eeprom, lock, fuse) all in one go using the various sections from the ELF