|
NetBurner 3.5.8
PDF Version |
Example Path: examples/EFFS/Std
EFFS-STD is NetBurner's file system for a module's on-chip flash memory. It is distinct from EFFS-FAT, which is a FAT32 file system for removable SD/MMC cards. Use EFFS-STD when you want to store files – web pages, configuration, certificates, keys, logs, application data – in the same flash the firmware runs from, with no external media.
These examples are grouped by the one thing that most changes how an application uses EFFS-STD: whether the platform already has a system file system.**
The i.MX RT modules (SOMRT1061, MODRT1171) boot with a system file system that the platform creates and mounts before UserMain() runs. It holds the device configuration, certificates, and the application firmware image itself. Key consequences for an application:
COMPCODEFLAGS, no fixed-address setting, and no libStdFFile.a.fs_main() or otherwise create the file system; it simply uses the already-mounted system file system (drive 0)./sys directory. All system content lives under /sys/files/, so application files at the root never collide with it.The ColdFire (MOD5441X, NANO54415, SB800EX) and SAME70 (MODM7AE70, SBE70LC) modules have no system file system. The application reserves a region of flash and creates and mounts its own EFFS-STD file system. This requires two build settings, both handled per platform in the example makefiles (you do not normally edit them by hand):
libStdFFile.a).COMPCODEFLAGS range (ColdFire) or -cflag C:3 ("locate
application at fixed address", SAME70).The application formats the file system on first boot and is free to reformat it at any time.
The examples live in two folders that match the two families.
For storing and serving files on a single EFFS-STD file system. Despite the folder name, the one example here builds for both families:
index.html web override. On ColdFire/SAME70 it uses the application-created file system; on the RT modules it uses the system file system at its root. This is the best starting point for storing/serving files on any supported platform.System File System (RT Platforms)
For the RT modules (SOMRT1061, MODRT1171) that have a system file system:
fs_format() its own storage without touching the system area. Not available on the MODRT1171 (its SPI NAND cannot be safely repartitioned at runtime); use HttpAFS there instead.