|
NetBurner 3.5.8
PDF Version |
This document provides the memory map and locations of reference materials for those who wish to add additional hardware to their NetBurner device.
The MODRT1171 is a high-performance System on Module built around the NXP i.MX RT1171 microprocessor. It is the recommended upgrade path and drop-in replacement for the MOD5441X, offering a faster processor, more memory, dual Gigabit Ethernet, and a larger application/file-system flash while preserving the familiar NetBurner development workflow and 100-pin dual-header form factor.
For detailed hardware and software guidance, two companion documents are provided as part of this platform reference:
The MODRT1171 uses the NXP i.MX RT1171 microprocessor (Arm Cortex-M7) running at 800MHz. The reference manual and datasheet provide in-depth information on the microprocessor, including register settings, bus configuration and timing information. It is located in the <nburn_install>\docs\NXP directory of your NetBurner installation.
Definitions for the MIMXRT1171 can be found in arch/cortex-m7/cpu/MIMXRT11xx/include/MIMXRT1176_cm7.h
The datasheet for the MODRT1171 module includes information on connectors, signal names, and operational parameters. It is located on the MODRT1171 product page under Documents and Downloads.
An Excel spreadsheet of pin assignments is also available under the same Datasheet link.
NetBurner has created an interactive Pin Configurator tool for the MODRT1171 which is available online at https://netburner.com/NBDocs/PinConfigurator/MODRT1171.html, as well as in your NNDK installation under <nburn_install>\docs\NetBurner\Platform\PinConfigurator
You may also find pinconstant.h to be a useful reference.
The DEV-MOD-105 development board schematic is located in the <nburn_install>\docs\NetBurner\platform\Schematics directory. This schematic can be used for design ideas in your own hardware implementation for power, RS-232, RS-485, and SD Flash card implementation.
The MODRT1171 uses the NXP i.MX RT1171 microcontroller. The reference manual and datasheet provide in-depth information on the processor, including register settings, bus configuration and timing information. The reference manual is located in the <nburn_install>\docs\NXP directory of your NetBurner installation.
The MODRT1171 uses a 128 MB SPI NAND flash (Winbond W25N01GVZEIG) connected via the LPSPI2 peripheral. The flash is managed by EFFS-STD (Embedded Flash File System - Standard), which provides a structured file system with FAT-like directory and file operations. A separate 8 Mbit (1 MB) SPI NOR boot flash (GD25Q80CEIGR) holds the boot monitor used by the boot ROM and is not part of the file system.
Unlike older NetBurner platforms that use fixed compile-time memory regions (COMPCODEFLAGS) to partition flash between application firmware and file storage, the MODRT1171 uses a dynamic partition table stored in the first erase block of the SPI NAND flash. This partition table defines how the flash is divided, and all persistent data — including the application firmware image — is stored as files within the EFFS file system.
Because the medium is NAND (rather than the NOR flash used on some other modules), the driver works in terms of pages and uses the spare/out-of-band (OOB) area for bad-block management. The EFFS-STD configuration adapts automatically to the detected flash type.
| File | Purpose |
|---|---|
| arch/cortex-m7/cpu/MIMXRT11xx/include/effs_pt.h | Partition table and EFFS config struct definitions |
| arch/cortex-m7/cpu/MIMXRT11xx/source/EffsStd.cpp | Flash driver implementation and mount_std_fs() |
| arch/cortex-m7/cpu/MIMXRT11xx/source/nbpart.cpp | Partition table operations and Hamming ECC |
| platform/MODRT1171/source/hal_storage.cpp | HAL storage layer (config, certs, app, user params) |
| platform/MODRT1171/include/hal_platdefs.h | Maximum storage size constants |
| nbrtos/include/file/fsf.h | EFFS-STD API macros |
| nbrtos/include/file/fsm.h | FS_SPACE struct definition |
The W25N01GVZEIG SPI NAND is organized as 2 KB pages (plus 64-byte OOB spare), 64 pages per 128 KB erase block, and 1024 erase blocks for a total of 128 MB. The logical layout is:
By default, a single EFFS partition spans from block 1 to the end of flash, and is marked as bootable. The first erase block is reserved for the partition table and is not part of any partition.
Important**: On the MODRT1171, the application firmware image is stored as a versioned file (A:/sys/files/app.xNN) inside the EFFS file system. There is no separate raw flash region for the application image as on older platforms such as the MOD5441X.
The partition table is defined in effs_pt.h and occupies the first erase block of SPI NAND.
On the MODRT1171, the default partition table uses a sectorLenExp of 17 (128 KB, matching the NAND erase-block size) and a totalSectors of 1024.
Partition types**: PARTITION_TYPE_EFFS (0x25) is the only type used by the NetBurner system. Other types (FAT12, FAT16, NTFS, Linux) are defined but reserved for future use.
MSB encoding**: When sectorCount or firstSector values exceed 2^23, the MSB is set and the value is encoded as (2^(exponent+4)) * mantissa, enabling representation of very large flash devices.
The partition table is protected by Hamming code checksums. Each 31-byte block of the table has an 8-bit checksum stored in the csums[] array. On read, validatePartitionTable() uses hamming_validateOrFix() to detect and correct single-bit errors. This protects against flash bit-rot and ensures the partition table remains valid over the device lifetime.
All functions are in nbpart.cpp:
| Function | Purpose |
|---|---|
| getPartitionTable(pt) | Read partition table from the first block and validate |
| createPartitionTable(pt, sectorLenExp, totalSectors) | Initialize an empty partition table |
| createPartitionEntry(pt, pte, startSector, sectorCount, type, bootable) | Create a new partition entry |
| createPartition(pt, pte) | Insert a partition entry (overlap-checked, sorted) |
| deletePartition(pt, partIdx) | Remove a partition entry |
| writePartitionTable(pt) | Compute checksums and write to flash |
| showPartitionTable(pt) | Debug print of partition table contents |
Each EFFS partition stores its configuration in an Effs_Cfg struct at the first block of the partition.
Default configuration** (created by createDefaultFilesystem() in EffsStd.cpp). On NAND, the values are derived from the detected page and erase-block geometry:
| Parameter | Value | Meaning |
|---|---|---|
| sSizeExp | 11 | 2 KB sectors (one NAND page) |
| blSizeExp | 17 | 128 KB blocks (erase unit) |
| dSizeExp | 17 | 128 KB for FAT + directory |
| cacheSizeExp | 11 | 2 KB write cache (one page) |
| separatedir | 1 | Directory kept separate from FAT (NAND) |
| maxblock | (calculated) | partitionSize / 128KB |
The maxblock value determines how many 128 KB blocks are available for file data storage within the partition. For the default single-partition configuration on the 128 MB NAND, this is approximately 1022 blocks (after subtracting the partition-table block and EFFS metadata blocks).
The EFFS file system is initialized automatically during the boot process, before UserMain() is called. Applications do not need to call any initialization functions.
After mounting, hal_bootPt is set to the index of the first bootable partition, and fs_chdrive(hal_bootPt) sets it as the default drive.
Each partition is backed by a set of flash operation callbacks, registered in fs_phy_AF() (EffsStd.cpp):
All operations translate logical block/sector addresses to physical NAND page numbers using:
Bounds checking ensures no operation can read or write outside the partition's page range. Because the device is NAND, the driver also performs bad-block detection (IsBadBlock()) and stores integrity information in each page's OOB spare area, so worn or factory-marked blocks are skipped automatically.
Since EFFS requires separate callback function pointers per drive, EffsStd.cpp generates 8 sets of wrapper functions (EraseFlash_0 through EraseFlash_7, etc.) that forward to a common implementation with the drive number as a parameter.
The HAL storage layer (hal_storage.cpp) manages four categories of system data as versioned files in the A:/sys/files/ directory:
| Storage Area | File Pattern | Max Size | Purpose |
|---|---|---|---|
| HalStore_Config | config.xNN | 32 KB | JSON system configuration |
| HalStore_Cert | certs.xNN | 2 MB | SSL/TLS certificate store |
| HalStore_UserParams | usrparam.xNN | 16 KB | Application user parameters |
| HalStore_App | app.xNN | 32 MB | Firmware application image |
Each file has a .xNN suffix where NN is a two-digit hex sequence number (00-FF). When a new version is saved:
This versioning scheme provides safe atomic updates: if a write is interrupted (e.g., power loss), the previous version remains intact and will be loaded on the next boot.
Previous file versions are cleaned up by FlashErasePrevVersions(), which runs in the idle task (OSTaskIdle) approximately 2 seconds after boot. It keeps only the 2 most recent versions of each file type and deletes older ones.
| Function | Purpose |
|---|---|
| HalStorage_Save(area, pData, len, offset) | Write a complete file (creates new version) |
| HalStorage_SavePartial(area, pData, len, offset) | Write partial data at an offset |
| HalStorage_Read(area, pData, len, offset) | Read from the latest version |
| HalStorage_Prepare(area, len, offset) | Open file for writing (with space management) |
| HalStorage_Finalize(area) | Close an open file handle |
| HalStorage_Erase(area, len, offset) | Delete all versions of a file |
| HalStorage_GetAllocated(area) | Get total usable space (free + used) |
| HalStorage_RemainingSpace(area) | Get free space on the boot partition |
| HalStorage_GetMaxAllocation(area) | Get per-area maximum size limit |
Use fs_getfreespace() to get current space statistics for any mounted drive:
The FS_SPACE struct is defined in nbrtos/include/file/fsm.h:
Maximum storage sizes per area are defined in platform/MODRT1171/include/hal_platdefs.h:
| Constant | Value | Description |
|---|---|---|
| PLAT_STORAGE_MAX_CONFIG_SIZE | 0x8000 (32 KB) | Maximum config file size |
| PLAT_STORAGE_MAX_USERPARAMS_SIZE | 0x4000 (16 KB) | Maximum user params size |
| PLAT_STORAGE_MAX_CERTSTORE_SIZE | 0x200000 (2 MB) | Maximum certificate store size |
| PLAT_STORAGE_MAX_APP_SIZE | 0x2000000 (32 MB) | Maximum application image size |
| PLAT_STORAGE_MAX_FILESYS_SIZE | 0x1F00000 (31 MB) | Maximum file system size |
Note: These constants are logical per-area maximums enforced by the HAL. The physical NAND is 128 MB, so the application image, file system, and user data all share the available NAND capacity minus the partition-table block and EFFS metadata.
| Region | Size |
|---|---|
| Partition table (first erase block) | 128 KB |
| Effs_Cfg (partition first block) | 128 KB |
| EFFS metadata (FAT + directory) | varies with partition size |
| Usable file storage | **~127 MB** |
The usable storage is shared between all files: system files (config, certs, app image, user params) and any application-created files.
Applications and the system share the same EFFS file system on the boot partition. There is no need to create a separate file system for application data.
Directory layout on the boot partition:**
Use standard EFFS-STD API for application files. Applications can freely create directories and files anywhere outside of A:/sys/:
Check available space before large writes. Since all data shares the same partition, a large application file could consume space needed for firmware updates or config saves. Use fs_getfreespace() to check:
The MODRT1171 is the upgrade path and replacement for the MOD5441X. Its partition-table approach is fundamentally different from the fixed-region approach used by the MOD5441X and other older NetBurner platforms (NANO54415, SB800EX, MODM7AE70, SBE70LC).
| Feature | MODRT1171 | MOD5441X |
|---|---|---|
| Processor | i.MX RT1171 Cortex-M7 @ 800 MHz | ColdFire MCF5441X @ 250 MHz |
| Flash Type | SPI NAND (128 MB) | Parallel NOR (32 MB) |
| Partitioning | Dynamic partition table in first block | Fixed COMPCODEFLAGS compile-time regions |
| App Image Storage | Stored as file in EFFS (A:/sys/files/app.xNN) | Dedicated raw flash region |
| Config/Certs | Versioned files in EFFS (*.xNN) | Dedicated flash sectors or EFFS files |
| Block Size | 128 KB NAND erase block | 128 KB |
| Sector Size | 2 KB (NAND page) | 1 KB |
| Max Partitions | 8 | 1 |
| Error Protection | Hamming codes on partition table and Effs_Cfg; NAND OOB bad-block management | None |
| FS Initialization | Automatic in HardwareInit() (before UserMain()) | Application must call EffsStart() |
| FS Source Files | Built into platform library | Copied from examples/_common/EFFS/STD/ |
At power-up or reset, the application is decompressed from the NAND flash file system to external SDRAM, verified by checksum, and execution begins. If the checksum fails or the application crashes, the device will reboot to the Configuration Server to facilitate a recovery by downloading a new application.
If the application causes an issue in which continuous traps occur, or the state of the system is such the Configuration Server cannot run, a recovery hardware jumper procedure can be used to reset the device. See MODRT1171 for the full recovery procedure.
There can be a maximum of 11 serial ports configured on the device (LPUART1, 2, 3, 5, 6, 7, 8, 9, 10, 11 and 12; LPUART4 is reserved for the system debug console). Note that each signal pin on the microprocessor can be configured for up to several different functions, so to achieve the maximum number of serial ports some peripheral functions will be unavailable.
Please refer to the Communication peripheral table in the MODRT1171 Quick Reference Card for the UART header pin locations. Port number mapping for software API calls is defined in MODRT1171/include/serial_platdefs.h in the <nburn_install>\platform folder.
For carrier board designers and system integrators, the MODRT1171 Hardware Design Guide provides detailed guidance on power supply design, reset circuitry, Ethernet, analog interfaces, digital I/O voltage domains, communication interface routing, the SD card and display interfaces, layout guidelines, and a pin-to-peripheral quick reference.
The MODRT1171 Quick Reference Card is a condensed quick-reference card covering the minimum connections required for operation, the full P1/P2 connector pinout, power and current-draw figures, a peripheral availability summary, voltage domains, common code patterns, and physical specifications.