I'm hoping to get some help in converting from IAR to Atmel Studio 7.0.
I have already gone through some tutorials
And have converting a numbmer of elements such as intrinsics and interrupts.....
However still have some thing that I need to modify.
The original code has the following line
__eeprom config_structure ee_config; // EEPROM stored copy
This create a structure which was stored in the eeprom.
This __eeprom is not found in the avr gcc and I was wanting to find what I can exchanged it with.
Some research make me think I can use the following
EEMEM config_structure ee_config;
Can someone please confirm that this is correct?
config_structre ee_config __attribute__((section(".eeprom")))
The current code I am working with has the following lines for the flash.
#pragma segment = "FLASHWRITE"
void avr_flash_wait(void) @ "FLASHWRITE"
while(SPMCSR & 0x01) // flash operation must be complete
while(EECR & 0x02) // EEPROM must be idle
I'm not too familiar with this terminology, and can't find references to it elsewhere, but I believe the idea is that this function (and other similar function) are designed to reside in the Read While Write section of the FLASH.
I notice the manual discusses the macro PROGMEM.
Can I just replace the @ "FLASHWRITE" with PROGMEM?
Any help would be much appreciated.