[Rahul Sapre] sent us a guide to porting EFSL to any microcontroller (PDF). The Embedded Filesystems Library adds FAT support to C compiled microcontrollers. It is targeted at the AVR line of chips but can be adapted to any architecture that works with a C compiler. [Rahul’s] guide will take you through the process of adapting the latest stable 0.2.8 version to new hardware by using a PIC uC as the working example. The non-stable development branch of EFSL is working toward multiple-platform support so consider lending a hand if this interests you.
24 thoughts on “FAT Support For Any Microcontroller”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
Sweet Jesus, something useful!
Gonna have to start working with 24F PICs now..
sigh.
Besides what I’ve been doing at my site above,
http://github.com/sparkfun
fat32lib is still a WiP, but fits in 10K with everything and usually doesn’t need it.
Arduino and Linux tested, but should be endian agnostic. High speed SDHC, uses under 600 bytes.
Used to get the jpeg trigger and and eye-fi upload a series of jpegs (dcimmer at the above site) which worked.
Find something with a FAT12 other than a floppy. And FAT16 is also legacy.
Is there any way to have a uC present itself as a FAT formatted block device (preferably via USB)?
Basically a “fake” memory card that is readable and writable by a computer.
Hi,
There is a library called MDD (Memory Disk Drive)
developed by Microhip (www.microchip.com)that does exactly what you describe.
I’ve been thinking for a while to build a programmer which presents itself as a mass storage device to the computer, and to program your chip you just drag & drop the .hex to the drive. A few vitual files could be used to access fuses, eeprom, etc.
However I’ve been too lazy to actually do it so I hope it inspires someone else.
Wait, so this works with an arduino, right?
LOL – it took my html < trollbait > tags! Above was meant as a joke
good, something useful
flamewar/ YES! finally! i can save my BlinkLed program to the sdcard to move it between multiple arduinos!
LOL
/Flamewar
Good post, this is what HAD should be about.
Ready-to-use solutions seldom appeal to me. In this case, I would more benefit from a concise documentation of the expected disk format. Of course, various bits about de oldie FAT can be found online, or deduced from some existing source code — but that’s the point: a knowledge in universal form (not bound to a specific language) and proven by its recent use is no less useful. What if I haven’t these 1K of RAM and 10K of code at hand – but I’m willing to sacrifice large chunks of functionality or even write in assembly?
Though I have to admit, my own software written for own needs does not always start with clear guidelines which are subsequently updated.
@tz
Thanks, this fat32lib is apparently more relevant to today’s uses.
Am I the only one for whom the Fat Controller sprung to mind?
Yes you are jeremy, I’m dork enough to understand you, but it never #sprung# to mind.
Attention, Astaro Web Gateway Version 7 reports when downloading EFSL
from Sourceforge (http://ignum.dl.sourceforge.net/project/efsl/efsl-devel/0.3.6/efsl-0.3.6.tar.bz2)
The content is blocked due to the following condition:
The item you have requested is infected by a virus. It will not be downloaded.
Report: HTML/Silly.Gen
a guide on FAT16 I was planning on using in a microcontroller project: http://www.digitalspirit.org/file/index.php/obj-download/docs/fat/appnote_fat16.pdf
What about Elm-Chan’s fatfs/tinyfatfs?
http://elm-chan.org/fsw/ff/00index_e.html
It is compact and tested by hundreds of projects. And can be copmiled equally well for a 6502 and for AVR and for what not. I used it myself (on a 6502), too.
@Stefan:
Nothing wrong here.
@svofski
Now that’s an interesting concept. Especially since I recall the Apple ][ (2) using a FAT idea for their DOS attributes and such like.
“vic: I’ve been thinking for a while to build a programmer which presents itself as a mass storage device to the computer, and to program your chip you just drag & drop the .hex to the drive. A few vitual files could be used to access fuses, eeprom, etc.”
@vic it exists, and #sparkfun sells it.
Further, I own one, and it blows.
Perhaps it’s time for me to look at a FAT driver. Fixed allocation and fixed card size sucks.
But since I already have a SD lib with write buffering, command queuing and streaming, I would only need the FAT layer. I guess I could use any FS and just transfer files with ethernet. Heck, the remote app could manage the filesystem if you normally only need read-access. Log files can be fix-size sequential system files.
It’s really too bad the SPI h/w of AVRs has such a shallow FIFO.
@Mikey : really? I couldn’t find it on the website, could you give a link?
I cant get this to work with the evk 1100…
anyone care to help me?
@vic:
“I’ve been thinking for a while to build a programmer which presents itself as a mass storage device to the computer, and to program your chip you just drag & drop the .hex to the drive.”
This is exactly how the NXP LPC134x / LPC17xx USB boot loader works. If you pull the right pins up/down during reset, these Cortex-M3 devices will enumerate as USB mass storage class devices and you can copy ‘firmware.bin’ to/from the uC’s flash ROM. Very cool idea.
@vic – I’m not sure but I also think that the “mbed” (mbed.org) does this.
@Mikey – how does “it” blow?