Nvs Partition Generator Utility - Espressif ESP32-S2 Programming Manual

Hide thumbs Also See for ESP32-S2:
Table of Contents

Advertisement

Chapter 2. API Reference

2.5.4 NVS Partition Generator Utility

Introduction
The utility
nvs_flash/nvs_partition_generator/nvs_partition_gen.py
vided in a CSV file. The binary file is compatible with NVS architecture defined in
is ideally suited for generating a binary blob, containing data specific to ODM/OEM, which can be flashed externally
at the time of device manufacturing. This allows manufacturers to generate many instances of the same application
firmware with customized parameters for each device, such as a serial number.
Prerequisites
To use this utility in encryption mode, install the following packages:
• cryptography package
All the required packages are included in requirements.txt in the root of the esp-idf directory.
CSV file format
Each line of a .csv file should contain 4 parameters, separated by a comma. The table below provides the description
for each of these parameters.
No.
Pa-
Description
ram-
e-
ter
1
Key
Key of the data. The data can be accessed later from an appli-
cation using this key.
2
Type Supported values are file, data and namespace.
3
En-
Supported values are: u8, i8, u16, i16, u32, i32, u64,
cod-
i64, string, hex2bin, base64 and binary. This
ing
specifies how actual data values are encoded in the resulting bi-
nary file. The difference between the string and binary
encoding is that string data is terminated with a NULL
character, whereas binary data is not.
4
Value Data value.
Note: The first line of the CSV file should be the column header and it is not configurable. Comments (if provided)
are allowed only as the first line of the CSV file, the following line then should always be the column header. Comments
should always start with the # symbol.
Below is an example dump of such a CSV file:
key,type,encoding,value
namespace_name,namespace,,
key1,data,u8,1
key2,file,string,/path/to/file
Note:
Espressif Systems
<--
column header
<--
First entry should be of
725
Submit Document Feedback
creates a binary file based on key-value pairs pro-
Non-Volatile
Notes
As of now, for the file
type, only hex2bin, base64,
string, and binary encoding
is supported.
Encoding and Value cells for the
namespace field type should be
empty. Encoding and Value of
namespace is fixed and is not
configurable. Any values in these
cells are ignored.
type
"namespace"
Storage. This utility
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF