Flash Data Format

I am looking for a storage library for storing data in flash memory on an embedded system. I'm on the verge of writing custom if you want a format with the right mix of features and simplicity.

Ideally, this would be a C / C ++ format and library with something better than storing raw structures, but less complex than a full-blown file system. I need to store several data structures, some of which are optional and may change the format from time to time.

It would be nice to use simple wear leveling / logging schemes and data redundancy and reliability functions. Simple logging is due to the fact that most of the low-level flash chips I work with are the happiest when you write from one end to the other and start from the top. Data backup / reliability can be used and parity bits or additional copies checked.

Any suggestions?

+7
c ++ c embedded
source share
3 answers

Check out my question .

I found out that fat16 (12) and ELM-Petit FAT File System Module are options that suit me. It required only to write / read sector code.

+3
source share

JFFS2 is an obvious candidate. I used it with MIPS and SuperH, but only with NAND. This gives excellent results in terms of wear and performance. No, this is a full-blown file system that doesn't seem to be what you are describing, but to be honest, I don’t think you will find the only solution for what you want. But it may be a sympathetic solution: JFFS2 + {SQLite | Protobuf | Berkeley DB }

I hope that I am wrong and you find him. :-)

+3
source share

Like Robert and Mtr, I can recommend the FitFs Generic File System Module . I use it on a Cortex-M3 with three logical devices (USB, SD-Card and external Flash). Especially f_mkfs was very convenient to force FileSystem to connect to external Flash. The "only" thing I had to write to myself was the low-level disk I / O functions. If you do not need all the functions provided by the FatFs module, reducing the size of the module is quite simple using config.h (I do not remember the name: D).

Edit: I chose FAT because it can be used by Win and Linux ...

+2
source share

All Articles