Writing data to flash memory; a practical solution?

I found a number of program examples showing how to store character strings and vectors of integers in AVR program memory but no good example of how to put a const struct into program memory. After playing around I came up with a design pattern for this. It uses a number C++ tricks to hide the details. Typically the struct data type need to be defined with a program memory reference version. There is also a need for member data access functions and a copy function to move the whole data structure from program memory to data memory.

Please see Sketchbook/ProgramMemory at master · mikaelpatel/Sketchbook · GitHub for more details.

I hope this can be of some aid.

Cheers, Mikael