Non-Volatile Storage Library - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 2. API Reference
+--------------------+---------------------------------------------------------
-------------+
|
--keyfile KEYFILE
+--------------------+---------------------------------------------------------
-------------+
|
--outdir OUTDIR
|
+--------------------+---------------------------------------------------------
-------------+
You can run the utility to generate only encryption keys using the command below:
python mfg_gen.py generate-key
Note:
Encryption key of the following format <outdir>/keys/keys-<timestamp>.bin is created.
Timestamp format is: %m-%d_%H-%M.
Note: To provide custom target filename use the –keyfile argument.
Generated encryption key binary file can further be used to encrypt factory images created on the per device basis.
The default numeric value: 1,2,3...of the fileid argument corresponds to each line bearing device instance values
in the master value CSV file.
While running the manufacturing utility, the following folders will be created in the specified outdir directory:
• bin/ for storing the generated binary files
• csv/ for storing the generated intermediate CSV files
• keys/ for storing encryption keys (when generating encrypted factory images)

2.5.3 Non-volatile storage library

Introduction
Non-volatile storage (NVS) library is designed to store key-value pairs in flash. This section introduces some concepts
used by NVS.
Underlying storage
Currently, NVS uses a portion of main flash memory through the
library uses all the partitions with data type and nvs subtype. The application can choose to use the partition
with the label nvs through the
nvs_open_from_partition()
Future versions of this library may have other storage backends to keep data in another flash chip (SPI or I2C), RTC,
FRAM, etc.
Note: if an NVS partition is truncated (for example, when the partition table layout is changed), its contents should
be erased. ESP-IDF build system provides a idf.py erase-flash target to erase all contents of the flash chip.
Note: NVS works best for storing many small values, rather than a few large values of the type'string' and'blob'
. If you need to store large blobs or strings, consider using the facilities provided by the FAT filesystem on top of the
Espressif Systems
|
Path to output encryption keys file
|
|
Output directory to store files
|
|
(Default: current directory)
|
nvs_open()
API function or any other partition by specifying its name using the
API function.
Submit Document Feedback
705
(continued from previous page)
created.
esp_partition
API. The
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