• AVR Freaks

FatFS vs MDD; RAM footprint & Multiple Drives

Author
andyhewitson
New Member
  • Total Posts : 13
  • Reward points : 0
  • Joined: 2009/04/17 12:36:07
  • Location: 0
  • Status: offline
2009/04/17 12:56:24 (permalink)
0

FatFS vs MDD; RAM footprint & Multiple Drives

I'm making technology choices for a new product that requires a file system library.  I have some experience with FatFS, but none with Microchip’s file system library.  Although my first preference is to use FatFS, the Microchip library might do a better job of conserving that precious SRAM resource.  Another factor leaning away from Microchip's library is that it appears to not support multiple simultaneous drives (in the same elegant way as FatFS "0:\file.txt", "1:\...", etc).  The latter is a deal breaker, and should be for many embedded projects that use dedicated onboard flash as well as removable storage (eg: thumb drive).

Questions:
1) Does the Microchip file system library (MDD) support multiple physical drives (simultaneously)?
2) How does the RAM footprint of FatFS compare to Microchip's library?
Thanks in advance.
#1

6 Replies Related Threads

    Kiwi Mike AZ
    Super Member
    • Total Posts : 2056
    • Reward points : 0
    • Status: offline
    RE: FatFS vs MDD; RAM footprint & Multiple Drives 2009/04/17 13:39:37 (permalink)
    0
    Answers:
     
    1) The Microchip Filse system DOES NOT support multiple devices.
     
    2) Stack size and memory useage depends on what features etc you need.
        Easiest way is to download the stacks and build a demo that is close to your requirements.
       
    FATFS for PIC32
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en539236
     
    FAT32 (Microchips File system)
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en537999
    #2
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: FatFS vs MDD; RAM footprint & Multiple Drives 2009/04/17 14:54:18 (permalink)
    0
    In my experience, FatFS is slightly smaller in code size and about the same in ram size.  Although I find some of the function calls confusing (especially the filename where you have to append the drive # plus a ':'), it does have a couple of nice advantages.  The biggest one is that it supports SDHC sd cards.  It also allows you to commit writes to the card as you go so that if a user pulls the card while writing a file, it doesn't corrup the card or file system.  I would like to see a performance comparison with the MDD filesystem.  FatFS seems to be very fast.  The MDD has the advantage of being integrated into many of the other Microchip software libraries.
    #3
    andyhewitson
    New Member
    • Total Posts : 13
    • Reward points : 0
    • Joined: 2009/04/17 12:36:07
    • Location: 0
    • Status: offline
    RE: FatFS vs MDD; RAM footprint & Multiple Drives 2009/04/17 16:31:17 (permalink)
    0
    Excellent points.  The integration with other Microchip libraries is a major factor and one that I had not adequately considered. For USB support through FatFS, the SCSI layer exports a nice API for sector read/writes that looks like it can easily tie into FatFS.

    What other "general purpose" libraries depend upon the microchip library?  Probably the FTP and HTTP server (maybe simple enough to port).  Possibly parts of the graphic library (display image from file?).  And of course the sample many applications, not that these matter to my project, but are considerations for others.


    #4
    jmag99
    Super Member
    • Total Posts : 486
    • Reward points : 0
    • Joined: 2007/09/21 08:04:33
    • Location: RI, United States
    • Status: offline
    RE: FatFS vs MDD; RAM footprint & Multiple Drives 2009/04/17 17:30:57 (permalink)
    0
    I don't think any of the major stacks except the usb code uses MDD.  I modified the usb thumbdrive bootloader to use an sd card and made it to I could swap between the MDD and FatFS file systems.  It did not take long to do this, but the FatFS has some different requirements that make it not as easy as changing the function call names.  The tcp stack uses it's own file system called MPFS.
    #5
    rubes99
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2009/10/02 06:46:12
    • Location: 0
    • Status: offline
    RE: FatFS vs MDD; RAM footprint & Multiple Drives 2010/01/04 15:13:29 (permalink)
    0
    jmag99: I am trying to do the similar thing, in that I am trying to use the USB drive as well as the SD Card for data logging and bootloading. Please let me know how you were able to perform such task? The current stack will not let me use two devices. my email address is ruben.loganantharaj@smartfield.com .... The help would be very generous.
    #6
    rowebots
    Junior Member
    • Total Posts : 93
    • Reward points : 0
    • Joined: 2008/11/27 09:11:38
    • Location: 0
    • Status: offline
    RE: FatFS vs MDD; RAM footprint & Multiple Drives 2010/01/05 13:09:26 (permalink)
    0
    Hi;

    I hope this isn't too off topic - this is something that might work for you.  We have a couple of file systems.  One is extent based and the second is fat based.  The extent based one is open source now and you could go and port this.  It will support multiple devices but only within the RTOS file structure that it comes with.  It runs on pic32, pic24 and dsPIC33. 

    In terms of size, a basic system with the extent based file system with a block cashe is about 5K of flash smaller and 9 larger in RAM usage.  Practical applications are in the range of 35-40K flash with 10-18K of ram.  This includes the kernel, file system and the application.  These are rough estimates and will vary by MCU choice.  (We support pic24, dsPIC33 and PIC32)

    There is dual licensing on this technology.  There is an open source version and there is a commercial version.  The details are on the Microchip pages under RTOS/RoweBots or you can find more details at rowebots.com

    BTW, the RTOSs are  an ultra tiny embedded Linux and POSIX compatible set of implementations.  They are called DSPnano (pic24 and dspic33) and Unison (pic32) respectively.


    Regards ... Kim

    http://rowebots.com
    #7
    Jump to:
    © 2020 APG vNext Commercial Version 4.5