Using ATmega128 with WinAVR and AVRStudio.
I created a section in the bootloader area of flash (0xFE00) with a subroutine that is used to modify some program memory space.
Problem is, now when I load the ELF file the .init code apparently can't copy global variable initial values from flash into RAM. The ELPM instruction always puts 0xFF into R0 rather than the actual value in flash. Using the HEX file seems to work better but still may have issues. Still looking into that.
My archive search yielded little, so I am wondering if anyone has encountered/solved this issue.