So be prepared to use a lot of program Flash space when invoking eeprom.h on a PIC based board.
There won't be any more flash space being used by the inclusion of eeprom.h. The last 4K of flash is always reserved by the boot loader and the linker script. The linker knows not to load any code in that memory. The content of the simulated eeprom should be preserved between different sketches, as the boot loader doesn't erase the entire chip when loading a new sketch. It only erases the pages that are being programmed by the new code image.
If it is the case that the simulated eeprom contents isn't being preserved, that would probably indicate a bug in the boot loader, but I don't believe that is happening.
One area of Mega compatibility that currently isn't being preserved by the Max32 is the amount of simulated eeprom. Right now, only 1K of simulated eeprom is supported. The ATmega2560 on the Mega has 4K of eeprom. The amount of simulated eeprom supported by the system can be modified by small changes to the eeprom library, boot loader, and linker script. A knowledgeable user could adjust the amount of simulated eeprom up to any amount desired (although going in blocks of the PIC32 flash page size would be a good idea)
What I meant by "be prepared to use a lot of program Flash space " was that the sketch size grew so much . The EEPROM example posted by Revilones complies to 2.2K for the Arduino UNO and 30.8K for the UNO32!
I am hard put to come up with a requirement for preserving the simluated or otherwise EEprom between sketches* , so it is no big deal as the simulated EEprom function works between resets and power up/down which is really what one wants. However it does confuse folks (me included) when they run the included EEprom examples (write, read, erase),in seperate sketches, which were written for "real EEproms" on the Arduino and subsequent reads, of previously written data, in a new sketch does not work.
Perhaps someone can present a sketch that shows writing to EEprom in one sketch ..loading a new sketch and reading back what was written.....
* actually there is a requirement ; when one needs to modify an existing sketch that uses the simulated EEprom and there has been data written to EEprom that was collected by that sketch (calibration data, setpoints, indexes, whatever) ......that might end up being a real bother