NetBurner 3.5.8
PDF Version
Standard File System (EFFS-STD)

Example Path: examples/EFFS/Std

Overview

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.**

Two Platform Families

RT modules – a system file system already exists

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:

  • The EFFS-STD file system is part of the platform – there is nothing to reserve in the flash memory map and no file-system library to link. There is no COMPCODEFLAGS, no fixed-address setting, and no libStdFFile.a.
  • The application does not call fs_main() or otherwise create the file system; it simply uses the already-mounted system file system (drive 0).
  • Application files are stored at the root of that file system, alongside the system's own /sys directory. All system content lives under /sys/files/, so application files at the root never collide with it.
  • Formatting is disabled, because the application image lives in this same file system.

ColdFire and SAME70 modules – the application creates the file system

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):

  • Link the EFFS-STD library (libStdFFile.a).
  • Reserve flash for the file system: 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.

Examples

The examples live in two folders that match the two families.

Application File System

Application File System

For storing and serving files on a single EFFS-STD file system. Despite the folder name, the one example here builds for both families:

  • HttpAFS – stores and serves files over HTTP and FTP, including an upload-your-own 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)

System File System (RT Platforms)

For the RT modules (SOMRT1061, MODRT1171) that have a system file system:

  • ShowSystemFileSystem – inspects the system file system: shows its size and contents (used, free, and bad-sector byte counts) and can clear application-added files. The best way to see what is actually stored on an RT module. (SOMRT1061 and MODRT1171.)
  • HttpSFS_MultiPartitionSOMRT1061 only. Creates a separate, formattable application partition (drive 1) alongside the protected system file system (drive 0), so an application can 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.
  • MultiPartitionSOMRT1061 only. The lower-level mechanism for creating and removing a second EFFS-STD partition, without the HTTP/FTP file-serving layer.

Which Example Should I Use?

  • Store and serve files on your module (any supported platform): HttpAFS.
  • On an RT module, you need a file system you can format without disturbing the configuration, certificates, or the application image: HttpSFS_MultiPartition (SOMRT1061).
  • See what is on an RT module's system file system, or clear application-added files: ShowSystemFileSystem**.
  • On a ColdFire or SAME70 module, you just need an application file system: HttpAFS.
Note
The EFFS-STD manual, "EFFS-STD-R1p91.pdf", is located in the "\nburn\docs" folder.