FAT support for any microcontroller

[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.

Comments

  1. medix says:

    Sweet Jesus, something useful!

    Gonna have to start working with 24F PICs now..

  2. tz says:

    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.

  3. Pavel says:

    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.

  4. Rahul says:

    Hi,

    There is a library called MDD (Memory Disk Drive)
    developed by Microhip (www.microchip.com)that does exactly what you describe.

  5. vic says:

    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.

  6. charper says:

    Wait, so this works with an arduino, right?

  7. charper says:

    LOL – it took my html < trollbait > tags! Above was meant as a joke

  8. therian says:

    good, something useful

  9. nutz4hs says:

    flamewar/ YES! finally! i can save my BlinkLed program to the sdcard to move it between multiple arduinos!
    LOL

    /Flamewar

  10. M4CGYV3R says:

    Good post, this is what HAD should be about.

  11. saimhe says:

    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.

  12. saimhe says:

    @tz

    Thanks, this fat32lib is apparently more relevant to today’s uses.

  13. Jeremy says:

    Am I the only one for whom the Fat Controller sprung to mind?

  14. McNoob says:

    Yes you are jeremy, I’m dork enough to understand you, but it never #sprung# to mind.

  15. Stefan says:

    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

  16. dax says:

    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

  17. svofski says:

    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.

  18. GCL says:

    @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.

  19. Mikey says:

    “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.

  20. DarkFader says:

    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.

  21. vic says:

    @Mikey : really? I couldn’t find it on the website, could you give a link?

  22. tyeo098 says:

    I cant get this to work with the evk 1100…
    anyone care to help me?

  23. ColinB says:

    @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.

  24. ericwertz says:

    @vic – I’m not sure but I also think that the “mbed” (mbed.org) does this.

    @Mikey – how does “it” blow?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,288 other followers