I needed an replacement for the EEPROM library on Arduni Due since it does not have EEPROM at all. Flash memory can be used in a similar so I created a library with the idea to have a similar syntax as the EEPROM library. More info at Ersättare för EEPROM på Arduino Due
and code at https://github.com/sebnil/DueFlashStorage
Example:
// write the value 123 to address 0
dueFlashStorage.write(0,123);
// read byte at address 0
byte b = dueFlashStorage.read(0);
Perhaphs it will be useful for someone else.