11.7 Dataflash Memory Access

The language tool cannot generate access to this kind of memory as it can generate access to other on-board memories. Please see your device data sheet or Family Reference Manual (FRM) for suggested access routines.

The compiler defines the following features to assist in defining and using dataflash memory that is available on certain devices.

  1. The tool defines a new memory space, space(dataflash), which may be applied as an attribute to any variable.
  2. The tool provides a new builtin to determine the address of a properly attributed dataflash variable:

    int foo[5] __attribute__((space(dataflash))) = { 1,2,3,4,5 };

    offset = __builtin_dataflashoffset(&foo);