I would like to place some large arrays into flash above the 64K level of an ATmega128.
.
I created a new memory section:
const int8_t __attribute__ ((section (".mymem"))) test[100] = {""};
and added ".mymem" to the memory sections options of the Studio GCC-pluging.( the period is important !!).
The hex files are correct although I understand Studio has the limitation that you can't debug with a JtagICE or the simulator these extra sections. You in fact have to load the hex file in ISP mode, and debug the device without reloading the code. Then you can debug the disassembled code.
So my questions are, how do I tell the complier to create the program memory pointer ( "test" above) as a "far" address so I can use the functions
buf[0] = pgm_read_byte_far(test);
Do I need to control the RAMPZ register directly?
Also will any of the *_P functions work, do they use ELPM?
Any help is greatly appreciated I've already lost a lot of hair over this "section" issue with studio.
Colin