![NXP Semiconductors SLN-LOCAL2-IOT User Manual Download Page 68](http://html.mh-extra.com/html/nxp-semiconductors/sln-local2-iot/sln-local2-iot_user-manual_1721901068.webp)
Chapter 10
Filesystem
The SLN-LOCAL2-IOT implements a custom filesystem to manage files with HyperFlash on the kit. The reasons why a custom
filesystem is chosen are as follows:
1. The device executes code from the flash (XiP), which means that it must read the flash from RAM functions.
2. HyperFlash has a 256-KB sector size, which does not allow for file granularity.
3. The update-in-place features are added to allow the update of big sectors without a time-consuming erase.
10.1 Generating filesystem-compatible files
Within the Ivaldi package, there is a script that converts any file into a filesystem supported file. Any file that gets programmed
to the filesystem must first pass through this script. This is required of all certificates and keys as well as any other files that the
reader needs.
Within the “Scripts/sln_iot_utils” folder of the release package, there is a Python script called file_format.py which is responsible
for creating a binary file formatted for the firmware’s filesystem. This script accepts the following parameters:
• “-if” parameter - passes the input file to be converted for the embedded filesystem
• “-of” parameter - passes the output file name
• “-ft” parameter - passes the flash type of the board; the acceptable values are as follows:
— “-ft H” for HyperFlash (used for SLN-LOCAL2-IOT)
— “-ft Q” for QSPI Flash (used for future platforms based on QSPI)
For SLN-LOCAL2-IOT, the file_format.py script should be called with “-ft H” parameter, because the platform has HyperFlash. For
example, you can run the command below. This will generate the binary file to be flashed into the device.
An example of running the file_format.py to convert the “../ota_signing/ca/certs/<cert_name>.ca.crt.pem” file to the
“<cert_name>.ca.crt.pem.bin” file suitable for the HyperFlash filesystem is in
Figure 79. file_format.py script description, usage, and logs
10.2 Generating new audio playback files
The custom filesystem for HyperFlash limits its size to 256 KB per file, which includes the file header as well as the sound data.
Therefore, make sure that the audio file is smaller than 256 KB.
NXP Semiconductors
SLN-LOCAL2-IOT Developer’s Guide, Rev. 0, 19 April 2021
User's Guide
68 / 87