Alter value in NVS partition

MrDuco
Posts: 3
Joined: Thu Mar 09, 2017 10:00 am

Alter value in NVS partition

Postby MrDuco » Thu May 29, 2025 11:03 am

Hi,

Is it possible to just alter values in the NVS partition by flashing the new key/values from a bin with parttool or esptool?

I can create the new bin file from csv with the NVS Partition Editor but when I use parttol or epstool to flash the NVS partition it overwrites all values and does not merge them with the new values, maybe this is not possible to do?

RathiSonika
Espressif staff
Espressif staff
Posts: 27
Joined: Thu Jun 22, 2023 2:58 pm

Re: Alter value in NVS partition

Postby RathiSonika » Mon Jun 02, 2025 6:44 am

Yes, this is the expected behavior. When flashing an NVS partition binary using tools like esptool.py or parttool.py, the entire partition is erased and replaced with the new binary, overwriting all existing key-value pairs.

To modify or add individual entries without clearing the whole partition, the recommended method is to use the ESP-IDF NVS APIs — nvs_open(), nvs_set_*(), and nvs_commit(). These APIs allow you to update specific keys while preserving other data in the same namespace.

Who is online

Users browsing this forum: No registered users and 4 guests