NetBurner 3.3.9
PDF Version
EFFS-STD File System with On-chip Flash

Using the EFFS-STD File System with On-chip Flash


The previous sections of this guide have focused on the EFFS-FAT file system, which is a FAT32 file system used for external flash cards. The EFFS-STD file system uses the on-chip flash memory of your NetBurner device. It has a different set of libraries and functions than the EFFS-FAT file system. In most cases the differences between the EFFS-STD and EFFS-FAT are simply a change in functioncall prefix from f_ to fs_. For example, the EFFS-FAT function call f_open() is fs_open() for EFFS-STD. A list of the documented functions can be found at EFFS-STD Flash File System.


When using the on-chip flash you need to be aware that the flash will be shared between your application and the file system. You will need to specify the amount of space to be used by the file system, while making sure you leave enough room for your application. The amount of flash used by your application is displayed each time you compile. You want to use the compressed number, not the uncompressed. You certainly want to leave enough additional space so your application can grow.

The flash memory chip will be divided into sectors, typically 4k or 64k bytes in size. The EFFS-STD file system requires that you allocate a number of these sectors to be used by the file system. Please review the data sheet for the flash memory used on your NetBurner device so you are familiar with the architecture. The configuration settings are dependent on the specific flash chip you are using.


EFFS STD Examples

The HTTP example located at \nburn\examples\EFFS\Std demonstrates HTTP access to the STD file system. Web pages can be served from the application itself, or overridden if the same file name exists in the file system.

EFFS STD With NetBurner's Security Library

Example are located at \nburn\examples\SSL HttpsUploadCert - This program will demonstrate how to upload certificates and keys to support SSL/TLS web page access and store them in the EFFS-STD file system.
SslVerifyPeerEffs - This program will demonstrate how to upload CA Lists to use in support of verify peer, and store them in the EFFS-STD file system.

Project Settings

To create a project that uses the EFFS-STD file system, you will need to complete a few extra steps in addition to your normal project setup.
For NBEclipse users:

  • Modify the COMPCODEFLAGS to match the new memory space of the application. The remaining space will be used for the file system. The format of the COMPCODEFLAGS setting is: COMPCODEFLAGS <start address> <end address>.
  • Add the EFFS-STD library StdFFile.a to the linker path
  • Import the source files found here into your project <nburn_install>\examples\_common\EFFS\STD

For projects that use the command line tools:

  • Add the following lines to your makefile:
    XTRALIB = $(NNDK_ROOT)/platform/$(PLATFORM)/original/lib/libStdFFile.a
    include $(NNDK_ROOT)/examples/_common/EFFS/STD/common.mak

Flash Memory Addresses

The flash memory on your NetBurner device is used for the Boot Monitor, System Parameter Storage, User Parameter Storage, Application, and now the EFFS-STD file system. A table of memory sizes for NetBurner platforms at the time of this writing is shown below. The example column illustrates one possible configuration. You can modify the parameters to suit your requirements. The COMPCODE flag starting address specifies the starting memory location of your application. The end address specifies the end location of the application. You should not modify the starting address! The Boot Monitor, Configuration Record and User Parameters occupy the space between the start of flash memory address and the start of the application memory address. You will only need to modify the end address to represent the amount of memory allocated for the flash file system.

Platform Total Size in Bytes Start Address End Address Configuration Definition Example
MODM7AE70 2MB 0x00400000 0x005FFFFF Example for 512K flash file system
Application must begin at 0x0040600
COMPCODEFLAGS = 0x00406004 0x005A0000
#define FLASH_SIZE ( 2*1024*1024 ) // Total flash size<br>#define FS_SIZE ( 256*512 ) // Size of filesystem

Configuration File for SAME70Q21

Please refer to the SAME70Q21.h file located at \nburn\examples\_common\EFFS\STD\src\flashChip