4.3.9.3 Flashn Qualifiers

Using both the __flashn and const qualifiers, where n can range from 1 thru 5, indicates that the object should be located in a different program memory section. For correct program operation, these sections must be positioned into the correct flash segment using the project’s linker script. Subject to your target device having the flash segments implemented, the __flash1 qualifier is associated with flash segment 1, which should be located in the flash segment from address 64 KB to 128 KB, with __flash2 qualified objects placed in a section that is linked to the segment from 128 KB to 196 KB, etc. Clearly, not all the __flashn qualifiers will available with all devices.

For those devices that do not have memory-mapped flash, data is read using the RAMPZ register and the elpm instruction, allowing the full program memory to be read.

Pointers that use these qualifiers can reference program memory, see 4.3.6.2 Data Pointers.