My first contribution to the Hydra community is my EEProm File System. It works sort of like the HAM system, in fact, I'm using the NS_EEprom_Drv code used by HAM to access the EEProm. I'm even using HAM to debug my app while working on it. What you can do with EEFS are the following.

The Propeller OS (here: http://forums.parallax.com/showthread.php?p=620700) includes an EEPROM file system that allows you to name 32K "pages" of EEPROM and copy files by name. You're welcome to strip out just the file system. Essentially, it stores a file name, some checksum information, and flag bits (for the content type) in the last few bytes of any EEPROM present on any pair of I/O pins. There's a routine that "mounts" an I2C bus on a pair of I/O pins so the file system knows about it. There are routines to look up a name or to look up a blank name (for an available area), then rename an area.

JimPishlo

01-19-2009, 08:13 AM

@Mike:· I'd love to take a look at what you have for the propeller OS.· I thought about paging the EEProm.· But I wanted 'file space' to be dynamically allocatable.· My next task will be adding the ability to delete a 'file' from EEProm.

@mpark:· I believe you can redistribute the NS Eeprom driver, because, Rich Benson (keebler) had it packaged up with his Hydra Asset Manager.· If I'm wrong, then I appologize, didn't mean to step on any toes, and I'll be happy to get permission from whomever, or even write my own, but there should be no need to re-invent the wheel.

@OldbitCollector: I don't think Andre' minds.· I posted about this project first on the Hydra forums over at xgs, and he just asked that I start up a source forge entry (http://sourceforge.net/projects/eefilesystem), update the wiki (which I haven't done yet), and tell you guys about it here on these forums.

I'm not using any kind of File Allocation tables for file location information.· I wanted to keep it simple and just have one growing heap for 'file' storage.· Everything is done in a sequential manor.· One file is located directly after another.· Kind of like on the old tape drives.· What happens is EEFS prepends a 16 byte header to your data.

The next header block, and file are located right after the file data.

To delete a file, I'll just have it shift all the file information upward to cover up the file you are deleting.· Kind of like a scroll function.· I'll have it write all zeros at the bottom of the file storage space to cover up the old copy of the last file so it's not duplicated.· The problem with this method is that it could be time consuming.· I'd have to use a temporary buffer, bring in a chunk of memory from EEProm, and re-write it to a spot further above it's old location back onto the EEProm.· I want this to have a small of a footprint as possible, so I'll have to limit the size of the temporary buffer.