As I understand, avr/pgmspace.h is a macro.
Can another macro be defined? Something like avr/farpgmspace.h that has the code given by pYro:
#define GET_FAR_ADDRESS(var) \
({ \
uint_farptr_t tmp; \
\
__asm__ __volatile__( \
\
"ldi %A0, lo8(%1)" "\n\t" \
"ldi %B0, hi8(%1)" "\n\t" \
"ldi %C0, hh8(%1)" "\n\t" \
"clr %D0" "\n\t" \
: \
"=d" (tmp) \
: \
"p" (&(var)) \
); \
tmp; \
})
#define PROGMEM_FAR __attribute__((section(".fini7")))
so that it would be easier to address this memory, kind of like
#include <avr/farpgmspace.h>
const unsigned short tuxfar[0x400] PROGMEM_FAR ={