Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

To use the NOR driver, five files, in addition to the generic file system files, must be included in the build:

  • fs_dev_nor.c.
  • fs_dev_nor.h.
  • fs_dev_nor_bsp.c (located in the user application or BSP).
  • A physical-layer driver (e.g., as provided in \Micrium\Software\uC-FS\Dev\NOR\PHY)

The file fs_dev_nor.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 directories must be on the project include path:

  • \Micrium\Software\uC-FS\Dev\NOR
  • \Micrium\Software\uC-FS\Dev\NOR\PHY

A single NOR volume is opened as shown in . The file system initialization (FS_Init()) function must have previously been called.

ROM characteristics and performance benchmarks of the NOR driver can be found in Driver Characterization. The NOR driver also provides interface functions to perform low-level operations (see FAT System Driver Functions).

FSVol_Open() opens/mounts a volume. The parameters are the volume name (5a), the device name (5b) and the partition that will be opened (5c). There is no restriction on the volume name (5a); however, it is typical to give the volume the same name as the underlying device. If the default partition is to be opened, or if the device is not partition, then the partition number (5c) should be zero.

FSVol_Fmt() formats a file system device. If the NOR has just been low-level format, it will have no file system on it after it is opened (it will be unformatted) and must be formatted before files can be created or accessed.

If the NOR initialization succeeds, the file system will produce the trace output as shown in  (if a sufficiently high trace level is configured). See Trace Configuration about configuring the trace level.

  • No labels