mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 04:34:31 +02:00
nvs_part_gen: Add changes to partition size input
This commit is contained in:
@@ -123,7 +123,7 @@ A sample CSV file is provided with the utility::
|
|||||||
+------------------------+----------------------------------------------------------------------------------------------+
|
+------------------------+----------------------------------------------------------------------------------------------+
|
||||||
| output | Path to output converted binary file. Will use stdout if omitted |
|
| output | Path to output converted binary file. Will use stdout if omitted |
|
||||||
+------------------------+----------------------------------------------------------------------------------------------+
|
+------------------------+----------------------------------------------------------------------------------------------+
|
||||||
| size | Size of NVS Partition in KB. Eg. 12KB |
|
| size | Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000 |
|
||||||
+------------------------+----------------------------------------------------------------------------------------------+
|
+------------------------+----------------------------------------------------------------------------------------------+
|
||||||
| --version {v1,v2} | Set version. Default: v2 |
|
| --version {v1,v2} | Set version. Default: v2 |
|
||||||
+-------------------------------+---------------------------------------------------------------------------------------+
|
+-------------------------------+---------------------------------------------------------------------------------------+
|
||||||
|
@@ -214,7 +214,6 @@ class Page(object):
|
|||||||
data_val = str(data_bytes) + (init_data_val * (data_len_needed - len(data_bytes)))
|
data_val = str(data_bytes) + (init_data_val * (data_len_needed - len(data_bytes)))
|
||||||
|
|
||||||
encr_data_ret = self.encrypt_entry(data_val, tweak_val, encr_key_input)
|
encr_data_ret = self.encrypt_entry(data_val, tweak_val, encr_key_input)
|
||||||
#print("\n<<<\n")
|
|
||||||
encr_data_to_write = encr_data_to_write + encr_data_ret
|
encr_data_to_write = encr_data_to_write + encr_data_ret
|
||||||
# Update values for encrypting next set of data bytes
|
# Update values for encrypting next set of data bytes
|
||||||
start_idx = end_idx
|
start_idx = end_idx
|
||||||
|
@@ -120,7 +120,7 @@ The mfg\_gen.py utility is using the generated CSV Configuration file and Master
|
|||||||
+------------------------+----------------------------------------------------------------------------------------------+
|
+------------------------+----------------------------------------------------------------------------------------------+
|
||||||
| Arguments | Description |
|
| Arguments | Description |
|
||||||
+========================+==============================================================================================+
|
+========================+==============================================================================================+
|
||||||
| --size PART_SIZE | the size of NVS Partition in KB. Eg. 12KB |
|
| --size PART_SIZE | Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000 |
|
||||||
+------------------------+----------------------------------------------------------------------------------------------+
|
+------------------------+----------------------------------------------------------------------------------------------+
|
||||||
| --conf CONFIG_FILE | the input configuration csv file |
|
| --conf CONFIG_FILE | the input configuration csv file |
|
||||||
+------------------------+----------------------------------------------------------------------------------------------+
|
+------------------------+----------------------------------------------------------------------------------------------+
|
||||||
@@ -136,7 +136,7 @@ The mfg\_gen.py utility is using the generated CSV Configuration file and Master
|
|||||||
|
|
||||||
**You can use the below command to run this utility with the sample files provided**::
|
**You can use the below command to run this utility with the sample files provided**::
|
||||||
|
|
||||||
$ ./mfg_gen.py --size 12KB --conf samples/sample_config.csv --values samples/sample_values.csv --prefix Fan
|
$ ./mfg_gen.py --size 0x3000 --conf samples/sample_config.csv --values samples/sample_values.csv --prefix Fan
|
||||||
|
|
||||||
|
|
||||||
.. 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:: The default numeric value: 1,2,3... of ``fileid`` argument, corresponds to each row having device instance values in master csv values file.
|
||||||
|
@@ -22,9 +22,10 @@ import csv
|
|||||||
import argparse
|
import argparse
|
||||||
import shutil
|
import shutil
|
||||||
import distutils.dir_util
|
import distutils.dir_util
|
||||||
from itertools import zip_longest
|
|
||||||
sys.path.insert(0, os.getenv('IDF_PATH') + "/components/nvs_flash/nvs_partition_generator/")
|
sys.path.insert(0, os.getenv('IDF_PATH') + "/components/nvs_flash/nvs_partition_generator/")
|
||||||
import nvs_partition_gen
|
import nvs_partition_gen
|
||||||
|
if not sys.version_info[0] < 3:
|
||||||
|
from itertools import zip_longest
|
||||||
|
|
||||||
def verify_values_exist(input_values_file, keys_in_values_file):
|
def verify_values_exist(input_values_file, keys_in_values_file):
|
||||||
""" Verify all keys have corresponding values in values file
|
""" Verify all keys have corresponding values in values file
|
||||||
@@ -306,7 +307,7 @@ file_identifier=None,output_dir_path=None):
|
|||||||
parser.add_argument("--size",
|
parser.add_argument("--size",
|
||||||
dest='part_size',
|
dest='part_size',
|
||||||
required=True,
|
required=True,
|
||||||
help='Size of NVS Partition in KB. Eg. 12KB')
|
help='Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000')
|
||||||
|
|
||||||
parser.add_argument('--conf',
|
parser.add_argument('--conf',
|
||||||
dest='config_file',
|
dest='config_file',
|
||||||
|
Reference in New Issue
Block a user