Hi,
I need to know how we can program nvs data for mass production. I know there is esptools and an exe for that, but say I need to embed a different certificate for each device, how I can use esptools to program it and use high level nvs function to read it at bootup ?
Thanks
ESP32 NVS Data to be programmed at factory
-
- Posts: 6
- Joined: Wed May 29, 2019 9:03 am
Re: ESP32 NVS Data to be programmed at factory
You will need a little bit more than esptool for that. You can use the utility mentioned by Zeni241 or make your own. The tool to generate NVS partitions from their CSV definition is nvs_partition_gen.py located in esp-idf/components/nvs_flash/nvs_partition_generator/ . So you basically have two choices : pre-generate the CSV with your security info in it and generate the binary just before flashing, or you can pre-generate the CSV and their associated binary. Unless you have very big NVS partitions, the difference in execution time should be negligible.
Then you just have to build a script that will basically call esptool with the right arguments : the first arguments for write_flash should stay the same, as well as the offset of the NVS partition offset, but the path to your security NVS partition will change. And that's it. Or you can build your script to copy-paste the NVS partition binaries in the right directory and never change the arguments of esptool.
Then you just have to build a script that will basically call esptool with the right arguments : the first arguments for write_flash should stay the same, as well as the offset of the NVS partition offset, but the path to your security NVS partition will change. And that's it. Or you can build your script to copy-paste the NVS partition binaries in the right directory and never change the arguments of esptool.
Re: ESP32 NVS Data to be programmed at factory
Great. Nice Concept. It can be used easily at time of production. Also It has security feature as well to generate it.Zeni241 wrote: ↑Fri May 31, 2019 4:45 amHave you seen this https://docs.espressif.com/projects/esp ... s_mfg.html ?
Regards,
Ritesh Prajapati
Ritesh Prajapati
Who is online
Users browsing this forum: Baidu [Spider], pacucha42 and 93 guests