File System for external EEPROM

triggered by this question - http://forum.arduino.cc/index.php?topic=205949.0 -

Would there be interest in a sort of SDFatLib for (external I2C) EEPROMS, sort of "EEFatLib"? (holiday project)

It would be much slower than SD cards, but it would allow to have one EEPROM work together with multiple sketches without interference and would help to prevent destructive side effects.

I was thinking about a linked list that was used to allocate blocks in EEPROM. These blocks would have : { ID, Name, Start, End, lastWrite(?), status={valid, deleted}, }. Then it occurred to me I was rebuilding a sort of FAT system.

Hi,

this will be great. No more interferences.

The best would be if the lib can handle i2c and spi eeproms of any size.

Thanx Jens

The RamDisk library in this post http://forum.arduino.cc/index.php?topic=229485 can be used with any memory device.

You need to write a class with these two member functions.

  virtual bool read(uint32_t address, void *buf, size_t nbyte) = 0;
  virtual bool write(uint32_t address, const void *buf, size_t nbyte) = 0;

The library has no cache since it is designed for RAM. For an EEPROM like the Microchip 25LC1024, it might wise to implement a 256 byte page cache in the EEPROM class. The filesystem library has a sync() function that could call the the cache flush function at the proper time.

I may see if I have a EEPROM device I can play with.