10.9.3 __eds__ Type Qualifier

The __eds__ qualifier indicates that the qualified object has been located in an EDS accessible memory space and that the compiler should manage the appropriate registers used to access this memory.

When used with pointers, it implies that the compiler should make few assumptions as to the memory space in which the pointer target is located and that the target may be in one of several memory spaces, which include: space(data) (and its subsets), eds, space(eedata), space(prog), space(psv), space(auto_psv), and on some devices space(pmp). Not all devices support all memory spaces. For example:

__eds__ unsigned int __attribute__((eds)) myEDSvar;

__eds__ char * myEDSpointer;

The compiler will automatically assert the page attribute to scalar variable declarations; this allows the compiler to generate more efficient code when accessing larger data types. Remember, scalar variables do not include structures or arrays. To force paging of a structure or array, please manually use the page attribute and the compiler will prevent the object from crossing a page boundary.

For read access to __eds__ qualified variables will automatically manipulate the PSVPAG or DSRPAG register (as appropriate). For devices that support extended data space memory, the compiler will also manipulate the DSWPAG register.

Note: Some devices use DSRPAG to represent extended read access to Flash or the extended data space (EDS).

For more on this qualifier, see the Extended Data Space Access section.