python nvs_partition_gen.py sample_singlepage_blob.csv partition_single_page.bin --version v1
+
+------------------------+----------------------------------------------------------------------------------------------+
| Arguments | Description |
+========================+==============================================================================================+
+------------------------+----------------------------------------------------------------------------------------------+
| output | Path to output converted binary file. Will use stdout if omitted |
+------------------------+----------------------------------------------------------------------------------------------+
-| size | Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000 |
+| size | Size of NVS Partition in bytes (must be multiple of 4096) |
+------------------------+----------------------------------------------------------------------------------------------+
| --version {v1,v2} | Set version. Default: v2 |
+-------------------------------+---------------------------------------------------------------------------------------+
# limitations under the License.
#
-from __future__ import division, print_function #, unicode_literals
+from __future__ import division, print_function
from builtins import int, range
from io import open
import sys
parser.add_argument(
"size",
- help='Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000')
+ help='Size of NVS Partition in bytes (must be multiple of 4096)')
parser.add_argument(
"--version",
+------------------------+----------------------------------------------------------------------------------------------+
| Arguments | Description |
+========================+==============================================================================================+
-| --size PART_SIZE | Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000 |
+| --size PART_SIZE | Size of NVS Partition in bytes (must be multiple of 4096) |
+------------------------+----------------------------------------------------------------------------------------------+
| --conf CONFIG_FILE | the input configuration csv file |
+------------------------+----------------------------------------------------------------------------------------------+
#
from __future__ import print_function
-from builtins import map, range
+from builtins import range
from future.moves.itertools import zip_longest
import sys
import os
sys.path.insert(0, os.getenv('IDF_PATH') + "/components/nvs_flash/nvs_partition_generator/")
import nvs_partition_gen
+
def verify_values_exist(input_values_file, keys_in_values_file):
""" Verify all keys have corresponding values in values file
"""
parser.add_argument("--size",
dest='part_size',
required=True,
- help='Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000')
+ help='Size of NVS Partition in bytes (must be multiple of 4096)')
parser.add_argument('--conf',
dest='config_file',