|
NetBurner 3.5.8
PDF Version |
Example Path: examples/EFFS/Std/ApplicationFileSystem
These examples cover storing and serving application files on a single EFFS-STD file system – the module's on-chip flash file system, as opposed to EFFS-FAT (a FAT32 file system for removable SD/MMC cards).
The primary audience is NetBurner platforms that have no system file system – the ColdFire (MOD5441X, NANO54415, SB800EX) and SAME70 (MODM7AE70, SBE70LC) modules. On these platforms the application creates and mounts its own EFFS-STD file system: it reserves a flash region (via COMPCODEFLAGS or a fixed-address reserve), describes the flash geometry, supplies the physical flash driver, and formats the file system on first boot.
The same example also builds for the i.MX RT modules (SOMRT1061, MODRT1171), which do have a system file system. There, the application does not create a file system – it simply stores and serves its files on the existing system file system (drive 0) at the root directory, alongside the device's /sys area. (Formatting is disabled on the RT modules, because that file system also holds the application image.) All system files live under /sys/files/, so application files at the root never collide with them.
On a platform without a system file system, two build settings give the application a file system to use. Both are already set per platform in the example makefile – this is simply what they do:
At run time the application calls fs_main() (which calls EffsStart()) to format the reserved region on first boot and mount it. The example's ReadMe lists the suggested file-system size for each platform and where to change it.
EFFS-STD HTTP (Application File System)
HttpAFS** demonstrates a complete file-storage application built on a single EFFS-STD file system:
It builds for every supported platform: the ColdFire/SAME70 modules (where it creates its own file system) and the RT modules (where it uses the system file system at its root). It is the recommended starting point for storing and serving files on any NetBurner module.