This utility is designed to create per device instances factory nvs partition images for mass manufacturing purposes.
These images are created from user provided configuration and values csv files.
This utility only creates the manufacturing binary images and you can choose to use esptool.py or Windows based flash programming utility or direct flash programming to program these images at the time of manufacturing.
Prerequisites
------------------
**This utility is dependent on the esp-idf nvs partition utility.**
* Operating System requirements:
- Linux / MacOS / Windows (standard distributions)
* The following packages are needed for using this utility:
- Python version: 2.7 (minimum) is required.
- Link to install python: <https://www.python.org/downloads/>
..note:: Make sure the python path is set in the PATH environment variable before using this utility.
..note:: Make sure there are no spaces before and after ',' in the configuration file.
Master CSV Values File:
------------------------
This file contains details of the device to be manufactured. Each row in this file corresponds to a device instance.
The data in values file **must** have the following format::
key1,key2,key3,.....
value1,value2,value3,....
..note:: First line in this file should always be the ``key`` names. All the keys from the configuration file should be present here in the **same order**. This file can have additional columns(keys) and they will act like metadata and would not be part of final binary files.
Each row should have the ``value`` of the corresponding keys, separated by comma. If key has ``REPEAT`` tag, then its corresponding value **must** be entered in the second line only. Keep the entry empty for this value in the next lines. Below is the description of this parameter:
..note::*If 'REPEAT' tag is present, a new Master CSV Values File is created in the same folder as the input Master CSV File with the values inserted at each line for the key with 'REPEAT' tag.*
..note:: The --outdir directory is created if not present.
..note:: The file path given in the ``file`` type in the values file is expected to be relative to the current directory from which you are running the utility.
..note::``keys/`` directory is generated with the encryption keys filename of the form ``prefix-fileid-keys.bin``.
*You can also run the below command to use the utility to***only***generate encryption keys binary file ( following example 'keys/' directory is created in current path), which can further be used to encrypt per device instance factory images*::
..note:: When running utility to generate only ``keys``, if --keyfile is given it will generate encryption keys with filename given in --keyfile argument.
..note:: The default numeric value: 1,2,3... of ``fileid`` argument, corresponds to each row having device instance values in master csv values file.
..note::``bin/``**and**``csv/``**sub-directories are created in the**``outdir``**directory specified while running this utility. The binary files generated will be stored in**``bin/``**and the intermediate csv files generated will be stored in**``csv/``.