The Virtual File System (VFS)
The kernel uses a Virtual File System in order to make multiple storage devices as well as device drivers available in a single file system tree. Devices and file systems are mounted at points withing this tree, called mount points. These are indistinguishable from normal folders. When a program requests to open a file, the VFS identifies the correct driver or file system handler, and hands over operation. A pointer is set within the file node so that the search is not done again, making reads and writes as efficient as possible.
In the embedded OS, the root ("/") refers to the external SPI flash memory and is used for program storage. The SD card if present is mounted at "/sd".
Main Storage
FATFS is used as the file system backend. It is currently the only major middleware in the project as file systems in itself are very complex and would require too much time to write from scratch. As it is implemented within VFS it is still possible to replace it with a better and more UNIX-like file system if desired without impacting user programs. If desired, the microcontroller internal flash may be used as the backing storage instead of external memory.
The /dev File System
The /dev file system is a special file system giving access to device drivers as files. Devices are statically registered by a device structure containing function pointers for open, read, write, close and ioctl as well as the name for use in /dev. User software may then gain access by opening that file.
The /kfs File System
The /kfs file system is, like /dev, a special file system. Instead of giving access to drivers it gives access to internal kernel data. Typical data is memory use, network addressing etc.
The /pipe File System
The /pipe file system is used to implement pipes on the embedded OS. Pipes created on the OS are always created using files in this directory instead of the more general approach used on Linux systems. The pipe file system supports the creation of both unnamed and named pipes. They are implemented in the same manner, however unnamed pipes are not shown in a directory listing and may only be referenced using the file descriptors. When all the file descriptors are closed, unnamed pipes are deleted. Directories within /pipe are not supported.
Pipes created by the /pipe file system has a FIFO size of 512 bytes.
The /proc File System
The /proc file system is yet another special file system. It presents
information about running processes as files. Typically, the files are read
and parsed by the program top
to get a summary of what is going on in a
system.