Flash file system

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Looking for a small, light-weight Flash file system, preferably 8051 --C or
ASM.  Interface to Flash is via SPI, not parallel.

It doesn't have to be free.

Thanks,

-Martin



Re: Flash file system
Quoted text here. Click to load it
--C or
Quoted text here. Click to load it

The traditional way to do it is to layer a FAT filesystem over a flash
translation layer. The translation layer works by having a table at the
start of each erase unti that contains a table of all the logical
blocks, e.g. if if erase unit 0 contains logical blocks 10 and 20, the
table will contain 10 and 20 as the first two entries. When block 10 is
written with new data, the first entry in the table will be set to all
zeros and another table entry, possibly in another block will be set to
10. On a read, the FTL layer needs to invert this table - rather than
having a mapping from physical blocks to logical blocks it needs to go
from logical to physical. You can do this in two ways - either by
having a lookup table big enough to hold the entire translation (at 16
or 32 bits per sector), or by having a smaller table act as a cache.
Every now and again, you need to reclaim space by copying a full erase
unit into a spare one skipping the 0 entries and uupdating the
translation table as you go.

You need to do this for two reasons, first that you can typically only
erase units much larger than a sector (e.g. 64K vs 512 bytes), secondly
that you need to make sure that the erase units at the start of the
flash containing the FAT aren't worn out by being updated constantly.
Wear levelling and reclaim algorithms are subtle, because a poor choice
of algorithm will adversely affect the life expectancy of the flash
chip.

Some flash devices, like MMC and CF cards do this stuff internally and
look like a device where you can read and write arbitrary data to
sector sized blocks so you don't need the FTL layer, whereas others
like SmartMedia or standalone SPI flash chips leave it up to you.

FAT can scale from simple system, with just the root directory
containing short filenames, up to a more complex one with
subdirectories and long filenames.

Ridgecrop could supply you one, cost depending on what feature you need
and the details of the device.

Tom Thornhill
http://www.ridgecrop.demon.co.uk


Flash file system
Dear Martin

We have developed a DOS FAT file system for SD/MMC flash memory card

tha
allows a microcontroller to read/write files in a way that mirror
Unix.  Th
code is written in C.  The flash card can then be inserted into a P
car
reader and the files can be "double clicked" in Windows Explorer t
open an
modify.  You can read about the freeware version of our software
"Portable FA
Library for MCU Applications" Circuit Cellar, March 2005.

We also have a commercial version that we license. We would be eage

to adapt i
to suit your needs and provide full support to ensure a successfu
integratio
into your product.  If you are interested, please do not hesitate t
contac
me

Best regards

Pete Rizu

Email: pete at rizun.co



Re: Flash file system
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

You would do much better with this sort of announcement if you paid
even casual attention to the formatting of your article.  This sort
of thing doesn't engender any belief in the accuracy of your code.
In fact, I would expect it to be extremely buggy.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Flash file system

Quoted text here. Click to load it

It read fine here and the formatting was consistent Mr Smartypants.
I wonder what your code quality is like?

Mike



Re: Flash file system
4ax.com:

Quoted text here. Click to load it

It's poorly formatted for usenet, the line length is too long.  Sure, I
could muck around with settings on my newsreader, and probably get it to
look OK, but, why would I bother?

--
Richard

Re: Flash file system
Quoted text here. Click to load it

He obviously doesn't care what impression he leaves with potential
customers.  He would rather have a hissy-fit over being
criticized.  It's not my long eared gray animal that is getting
skinned.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Re: Flash file system
CB - Do you iron your underpants?

Yes, I top posted. Bad me.


Quoted text here. Click to load it



Re: Flash file system
Quoted text here. Click to load it

Wrong adjective.  Try foolish.

--
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on
We've slightly trimmed the long signature. Click to see the full one.
Flash file system
downloaded ivan's fat16 flash file system from circuit cella
had it running as advertised on my msp430 in 15 mi
  - georg


Re: Flash file system
Un bel giorno martin roth digit:

Quoted text here. Click to load it

Linux YAFFS or JFFS2.

--
asd

Re: Flash file system
I came across these people, while looking for something else:
http://www.hcc-embedded.com/site.php?mid11 %

Adrian

Quoted text here. Click to load it



Re: Flash file system
Quoted text here. Click to load it

TFS is an open source File system, suitable for Flash devices.
A very good article on TFS is at :
http://www.embedded.com/2000/0012/0012ia2.htm

Do a google to find the source.
-Neo



Re: Flash file system
Thanks for the suggestions.  I guess the problem here is the 8051.  Most of
the FFS's I've found are written for 16 or 32 bit processors.

-Martin


Quoted text here. Click to load it



Site Timeline