Flash Download Tool Combined BIN file erases stored NVS data

Josy_Rausch
Posts: 2
Joined: Tue Feb 03, 2026 10:50 am

Flash Download Tool Combined BIN file erases stored NVS data

Postby Josy_Rausch » Tue Jun 16, 2026 8:14 am

Hello,

I am using the Flash Download Tool to flash binaries to my ESP32-C6-WROOM-1.
I store some important data (a bool and an unsigned integer value) in NVS, and this works correctly because after a power restart I can still read the saved data.

When I make changes to my program and build it, the binary files are generated.
If I flash each binary file separately (bootloader.bin, partition_table.bin, and app.bin) and then perform a power restart, the NVS data is not deleted.

However, when I combine the three binary files into one and flash this single binary file, my saved NVS data gets deleted.

I understand from the documentation that this can happen when using the “combine” option:
Screenshot 2026-06-12 105700.png
Screenshot 2026-06-12 105700.png (69.12 KiB) Viewed 70 times
I would expect, however, that flashing the three binaries separately or flashing a combined binary should behave in the same way.

Am I doing something wrong?
How can I prevent the NVS data from being erased when using the combined binary method?

Sprite
Espressif staff
Espressif staff
Posts: 10612
Joined: Thu Nov 26, 2015 4:08 am

Re: Flash Download Tool Combined BIN file erases stored NVS data

Postby Sprite » Tue Jun 16, 2026 11:47 pm

'Any unused area between firmware files will be filled with FF' - and I bet that the NVS area is somewhere between your bootloader and app. Solution, if you insist on flashing the combined binary, would be to customize your partition table so the NVS partition comes after the app partition.

Josy_Rausch
Posts: 2
Joined: Tue Feb 03, 2026 10:50 am

Re: Flash Download Tool Combined BIN file erases stored NVS data

Postby Josy_Rausch » Mon Jun 22, 2026 9:40 am

'Any unused area between firmware files will be filled with FF' - and I bet that the NVS area is somewhere between your bootloader and app. Solution, if you insist on flashing the combined binary, would be to customize your partition table so the NVS partition comes after the app partition.
Alright, Thank you.

Who is online

Users browsing this forum: ChatGPT-User, coccocbot, GPTBot and 2 guests