I am evaluating the Keil File System Middleware. I have encountered a problem. Hopeful someone could give me a quick and clear hint.
It seems there are two types of file systems in the FS middle ware: Embedded FS and FAT FS.
Could someone tell me the differences between this two types.
I have noticed that NOR flash type be configured to use the Embedded FS type.
Could this Embedded FS be compatible with the USB Mass storage Class?(Treated as a plugged U Disk by the PC).
Could NOR Flash be configured to use the FAT FS? I have noticed the open source FAT FS doesn't distinguish the NOR Flash from other storage media.
Could a pure SPI Flash(i.e. Winbond W25Q32) be configured as the NOR Flash? The official Keil Pack includes a special NOR Flash(AT45DB642D) which supported both bus style NOR flash access method and a SPI style.
Thanks.
I have found the limitation about the Embedded File System on the Keil website.
Limitations
The following restrictions are applicable to the EFS:
This file system is not compatible with the FAT file system and cannot be used with an USB mass storage device.
Directories or folders are not supported.
File names are preprocessed to remove the path information for non-FAT file systems.
Maximum file name length is limited to 31 characters.
Timestamp information is not supported for a file.
Drive partitions are not supported.
Search within files works only for files opened in read mode.
In the Keil supplied code fs_config.h:
#if (NOR0_ENABLE) { &nor0_vol, "F0", FS_EMB | NOR0_DEFAULT_DRIVE },
The NOR flash is by default configured as embedded file system. Is it mandatory? If so, I would drop my migration idea and resign to the open source FAT FS solution.
Just cleared myself some confusing stuff.
The Keil MDK4 has a different middle ware system from Keil MDK5. The file system middle ware in MDK4 is called RL-FlashFS. While they change it to File System Component in MDK5. The RL-FlashFS seems to have SPI Flash support. I am very confused why it got dropped in a new version. I have not MDK4 and could not try it out now.
It is frustrating day that I have spent good time reading about the very different middle ware of MDK4. The two document structures are well-weaved on the Keil website.
I will spend one more day trying to solve this mystery. If I could not, I would return the open source FAT FS solution.
Can't say I've spent any time with the middleware, you can run file systems on all manner of devices, NAND, NOR, SDCARD, etc, what's important to understand is the expectations of both. There is a very wide selection of NAND/NOR parts, with different geometry/organization. NAND typically presents much larger blocks, and requires error correction and mitigation, and management of the smaller writes the file system (and user) typically throw at it. The SDCARD uses NAND, but hides a lot of the underlying issue behind the hardware interface.
You should really discuss your issues with a Keil support representative assigned to your account.
You can trick Keil's Middleware to use SPI flash with FAT file system, but flash memory must have sector-level erase capability. I have done that by modifying RAM disk driver to access SPI-attached AT45DB16 SPI flash memory, but it was a tricky job. If you have experience with open-source FAT FS, stick to it. For me it was a clean start, so I decided to use Keil's middleware for all peripherals.
regards
Dejan