11.11.3 Accessing EEData Using Managed Access

On most device the EEData space is part of the program address space. Therefore EEData can be accessed automatically using one of the managed access qualifiers __psv__ or __eds__.

Using Managed PSV Access

#include <xc.h>

__eds__ char user_data[] __attribute__((space(eedata))) = { /* values */ };

int main(void) {
  int value;
  value = user_data[0];
  if (value) ; /* do something */
}