I am working with the IAR C Compiler, to produce the code.hex and eeprom.hex files. After this, in order to write the AVR I am following the steps:
(Using the AVR Studio and a programmer)
1. I am writing the code.hex in flash memory
2. I am writing the eeprom.hex in eeprom memory
3. I am writing the OSCCAL value in EEPROM 0x00 (if internal RC is used)
4. I am setting the Fuse Bits
5. I am setting the Lock Bits
I would like to ask you if there is any way to include all these functions in my 2 files (code.hex and eeprom.hex) and how?