To use the RAM disk driver, two files, in addition to the generic FS files, must be included in the build:
fs_dev_ramdisk.c
.fs_dev_ramdisk.h
.
The file fs_dev_ramdisk.h
must also be #included in any application or header files that directly reference the driver (for example, by registering the device driver). The following directory must be on the project include path:
\Micrium\Software\uC-FS\Dev\RAMDisk
A single RAM disk is opened as shown in . The file system initialization (FS_Init()
) function must have previously been called.
ROM/RAM characteristics and performance benchmarks of the RAM disk driver can be found in Driver Characterization. For more information about the FS_DEV_RAM_CFG
structure, see section FS_DEV_RAM_CFG.
If the RAM disk initialization succeeds, the file system will produce the trace output as shown in Figure 13-1 (if a sufficiently high trace level is configured). See section E-9 “Trace Configuration” about configuring the trace level.