Open source software for FAT file system over MMC SDC
|
Open source software (OSS) is defined as computer software.
The demand of MMC/SDC integration drives the market and open source communities. Now we can find some useful open source projects for MMC/SDC libraries for embedded applications, not only for Linux, but also for deep embedded applications. Recently I investigated and tried to design a low-cost picture/video surveillance device with some cheap microcontrollers like ATmega, MSP430, Cortex-M3 and ARM7TDMI. These microcontrollers deliver more connectivity capabilities including USB, UART/IrDA, SPI/SSP/SDIO and I2C in smaller size and much lower price. It is very natural for me to design a low cost DC with PIR activation feature in security surveillance. The surveillance device captures the image from the camera and stores it into a SD card. Therefore, FAT file system over MMC/SDC is very essential for this application.
Open Source Projects
EFSL (Embedded Filesystem Library)
This OSS project runs on PC (GNU/Linux, development environment), TMS C6000 DSP from TI, and ATmega from Atmel (see the Datasheet). In general, more memory will increase the performance. The EFSL requires as little as 1.5KB RAM, so low-end microcontroller can benefit from this feature. Martin Thomas, the maintainer of WinARM, has ported EFSL to Atmel and NXP ARM7TDMI chip. It is good for me, since I finally decided to use the cheapest LPC2103 for my low cost surveillance device.
The project contains a user manual for system integration. The source code is also self-explained. It is easy to be ported to other architectures.
FF/TFF (FatFile and TinyFatFile)
FF/TFF is maintained by Mr. ChanN, a Japanese electronics Engineer. The project has been ported and tested on AVR (ATmega64, 8bit RISC), H8/300H (Renesas HD64F3694, 16bit CISC), PIC (PIC24FJ64GA002, 16bit RISC), TLCS (Toshiba TMP86FM29, 8bit CISC), V850ES (NEC uPD70F3716, 32bit RISC) on MMC/SD, CF and ATA HDD.
The sample projects include functional test of FatFs/TinyFatFs module with low level disk I/O codes. You are able to find various implementations on the web other than these sample projects, such as: SH2, LPC2000, STR7, MSP430, PIC and Z8.
For most applications, such as portable audio and data logger, TinyFatFs is the best choice. However TinyFatFs does not support FAT32 by default, and has a limitation of handling small storage up to 2GB. The FAT32 support can be added by _USE_FAT32 option with an additional code size. The FatFs is suitable for fast multiple files access and for multiple drive system.
Besides, I highly recommend reading the application note of FF/TFF, in case you have issues on abstraction of file object, efficient sector buffer management, long file name of Microsoft, and porting issues for RTOS.
Commercial Package
uC/FS
uC/FS is an optional component of uC/OS-II. Its source is open, but it is a commercial product. You can download the demo version for ATA/Smart Media from its web. Or You can port low level drivers of SD cards to replace the Smart media card driver of the demo version.
Dependency
The file system has module dependency of hardware I/O access and RTC. For MMC/SD and most of the microcontrollers, SPI mode will be selected as hardware layer protocol, and PIO mode will be selected for CF/ATA HDD. The LPC2368/78 and STM32F103XXXX have integrated the faster standard SDIO port, which offers four times performance of SPI mode. RTC is important for file writing routines, of course the RTC can be simulated by a general purpose timer in the microcontroller. However LPC2000 and some Cortex-M3 microcontrollers come out of the shelf with a RTC on board.
Read More
FAT File System Module (FatFs/TinyFatFs) by ChanN
EFSL, Embedded Filesystem Library
The maintainer of WinARM, Martin THOMAS, who also offers the ports for the Embedded Filesystem Library and FF/TFF Modules to the AT91SAM7S-controllers (AT91SAM7S64, AT91SAM7S256) and LPC2138.
- allankliu's blog
- Login or register to post comments
- 9785 reads


