![]() |
File System Component
Version 6.3
MDK-Professional Middleware for Devices with Flash File System
|
The File System Component provides functions to create, save, read, and modify files. The Retarget Interface of the ARM C/C++ compiler run-time library allows the usage of ANSI C standard file I/O functions. The File System Component is designed for Cortex-M processor-based devices and requires an CMSIS-RTOS compliant real-time operating system for thread-safe operation.
The File System Component uses two different file systems depending on the media type:
The File System Component integrates with the ARM Standard Run-Time Library and requires a CMSIS-RTOS compliant RTOS. It cannot be used with the ARM MicroLIB library since this library does not provide the hooks for I/O file handling.
The following picture shows the File System's structure from a developer's perspective.
The configuration steps and files that are needed to create applications for the different devices are explained here:
The File System Component supports various memory and storage devices that are assigned to a drive.
All available drives are defined with the RTE Component Selection. A drive is passed as string to System Routines and may be part of a filename. The system allows you to configure current drive that is used when no drive is specified as part of the filename.
Drive | File System | Drive Type |
---|---|---|
"F:" or "F0:" | EFS | NOR or SPI Flash drive 0 |
"F1:" | EFS | NOR or SPI Flash drive 1 |
"R:" or "R0:" | FAT | RAM drive |
"M:" or "M0:" | FAT | Memory Card drive 0 |
"M1:" | FAT | Memory Card drive 1 |
"U:" or "U0:" | FAT | USB Memory Stick drive 0 |
"U1:" | FAT | USB Memory Stick drive 1 |
"N:" or "N0:" | FAT | NAND Flash drive 0 |
"N1:" | FAT | NAND Flash drive 1 |
The Current Drive defines the drive used when the filename itself does not specify the drive or when functions that expect a drive are called with an empty ("") string.
An Initial Current Drive is defined in the FS_Config.c configuration file and is used at startup to set the Current Drive. The Current Drive can be changed during run-time using the function fchdrive.