Electronic – AVR studio flash file annoyance

avr

Every time I want to program my ATtiny85 using AVR Studio 6 it has the MyProject.elf file pre-selected in the "Flash" drop-down box in the Device Programming dialog. Obviously I want it to program the MyProject.hex file, but I manually have to select this every time using the drop-down list. Does anyone know a trick to get my selection to stick?

Best Answer

According to the What is ELF file and how to program it on the AVR devices? support FAQ at Atmel the following is given as a difference:

The difference is when you generate it in AVR Studio you can save the file with data like EEPROM, FLASH, FUSE SETTINGS and LOCK BITS. But the same ELF file, if it is generated through compiler then it contains debugging with source code property along with all we mentioned before. The generated ELF file can be specified as input to the programming dialog so that all contents of the file is programmed in one operation.

Opening up an ELF file I have for an ATtiny85 project it is a total of 386 kB in size and does contain debugging information including the full symbol table and location of all the source code files, but that is skipped during device programming.

There are a number of ELF file viewers available and if you install one and examine the file you'll see that while complex in one way they are broken into a number of sections, so it'd be easy for the programming phase to only use the relevant parts to program the device.