Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flash memory data format [duplicate]

Tags:

c++

c

embedded

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

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

Nice to haves would be simple wear leveling / journaling schemes and data redundancy/reliability features. The simple journaling is because most low level flash chips I'm working with are happiest when you write from one end to another and start over at the top. Data redundancy/reliability could be use and checking of parity bits or complete extra copies.

Any suggestions?

like image 829
Digikata Avatar asked Jul 14 '10 17:07

Digikata


1 Answers

JFFS2 is an obvious candidate. I have used it extensibly with MIPS and SuperH guys, but only with NAND. It gives great results in wear leveling and performance. Not, it is a full-blown file-system which doesn't seem to be what you describe, but honestly, I don't think you'll find a single solution for what you want. But it might be the simeplest solution: JFFS2 + {SQLite|Protobuf|Berkeley DB}

I do hope that I'm wrong and you find one. :-)

like image 156
Gianni Avatar answered Sep 29 '22 00:09

Gianni