Flash File System

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash File System

2,634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Sun Aug 07 04:43:18 MST 2011
Who can recommend a FFS for use with FAT16, possibly FAT32

Target hardware is 1765 with Atmel Dataflash.
0 Kudos
Reply
10 Replies

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Tue Aug 30 05:06:06 MST 2011
I have the FatFS going now with external dataflash and USBMSD.

The only thing that's not perfect is that the volume label shown in XP (sp3) is blank.  

Any ideas?
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Thu Aug 11 07:49:04 MST 2011

Quote: Rob65
I am just now switching over from EFSL to Chan's FatFS.
Maybe not because it is so actively maintained but surely because of its configurability. As a plus it even looks to be a bit smaller than EFSL too.



I really hate HOW it's written (code formatting ... I find it painful to read and try to understand in any detail), but it is well written from a functional point of view.  It's easy to configure, quite thorough, and the examples provided (MMC, Compact Flash, even classic Hard Disks) makes it easy to use.  It was a no brainer for me to choose FatFS, and I've been very happy with it since it's nice to have a decent amount of control over what's included during complilation ... important when working with 32KB or smaller parts.
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Thu Aug 11 02:57:11 MST 2011
I'm waiting to hear from m customer on whether I need to implement the file system. If i do, then I have the bother of wear levelling to do.

It's not so much the file regions, but the FAT table. I'm considering having the file pointers and file sizes stored separately in eeprom, then reconstructing the FAT when there is a read request from the USBMSD i/f.
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Thu Aug 11 02:28:59 MST 2011

Quote: jharwood
avoid the use of long file names in the context of FAT. Microsoft holds a patent on that feature



Thanks, that's a good thing to remember.
Per default Chan's FatFS has long file names disabled. Overall I am quite happy with the default settings of Chan's FatFS.

But do use the original FatFS source from Chan's site (http://elm-chan.org/fsw/ff/00index_e.html), Martin Thomas's page contains an older version - but still is a nice reference of course.
Also check out the example code that Chan provides, next to the example showing how to use the library it also contains an implementation of the disk I/O functions (mmc.c).

I am just now switching over from EFSL to Chan's FatFS.
Maybe not because it is so actively maintained but surely because of its configurability. As a plus it even looks to be a bit smaller than EFSL too.

Rob
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Thu Aug 11 02:24:13 MST 2011
Ah, yes I had forgotten that.

Well, it's a datalogging app, with auto generated file names, so there won't be any long ones :)
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jharwood on Wed Aug 10 20:43:48 MST 2011
If your project ever hits the streets, you may want to avoid the use of long file names in the context of FAT. Microsoft holds a patent on that feature, and has been known to go after unwary companies that infringe it.
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Aug 08 02:30:59 MST 2011

Quote: OXO
Due to the nature of my app, I will also need wear levelling :(

That is more tricky..



With any FatFS you will need wear leveling - otherwise you'll run out of write cycles of your FAT and directory sectors quite fast ...

If you still have the option you could also use a (micro) SD Card.
SD cards have integrated wear leveling and much more data storage.
Cons are that it is  more expensive (I paid € 1,59 for a micro SD connector, Farnell part no. 1686452, an A25L032 costs 'just' € 1,96).
Also speed is limited to 25 MHz on the SPI.

Rob
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Sun Aug 07 23:39:16 MST 2011

Quote: KTownsend
Chan's FatFS (reference in the previous post) is the most actively maintained one out there with an open-source license.  It might take a bit of time to wrap your head around it all and the code could probably be a bit more readable, but it's reliable and actively maintained and supports everything you likely want: FAT32, long filenames - code size permitting - etc.

I've been pretty happy with it myself and with a bit of configuration it fits fine onto the 1114 and 1343 so there shouldn't be any problem on the 176x even if you need long file names of unicode filenames etc.



Yes, it looks quite good. Due to the nature of my app, I will also need wear levelling :(

That is more tricky..
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ktownsend on Sun Aug 07 17:02:09 MST 2011
Chan's FatFS (reference in the previous post) is the most actively maintained one out there with an open-source license.  It might take a bit of time to wrap your head around it all and the code could probably be a bit more readable, but it's reliable and actively maintained and supports everything you likely want: FAT32, long filenames - code size permitting - etc.

I've been pretty happy with it myself and with a bit of configuration it fits fine onto the 1114 and 1343 so there shouldn't be any problem on the 176x even if you need long file names of unicode filenames etc.
0 Kudos
Reply

2,580 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by OXO on Sun Aug 07 05:15:48 MST 2011
Update:

Found this http://gandalf.arubi.uni-kl.de/avr_projects/arm_projects/arm_memcards/index.html#chanfat_lpc_cm3
0 Kudos
Reply