python nvs_partition_gen.py --input sample_singlepage_blob.csv --output partition_single_page.bin --size 0x3000 --version v1
+.. note:: *Minimum NVS Partition Size needed is 0x3000 bytes.*
+
.. note:: *When flashing the binary onto the device, make sure it is consistent with the application's sdkconfig.*
Caveats
to accomodate the data in the given csv file
"""
def __init__(self, e):
- super(InsufficientSizeError, self).__init__(e)
+ super(InsufficientSizeError, self).__init__(e)
def nvs_open(result_obj, input_size):
""" Wrapper to create and NVS class object. This object can later be used to set key-value pairs
input_size = int(input_size, 0)
if input_size % 4096 !=0:
- sys.exit("Size of partition (must be multiple of 4096)")
+ sys.exit("Size of partition must be multiple of 4096")
# Update size as a page needs to be reserved of size 4KB
input_size = input_size - Page.PAGE_PARAMS["max_size"]
- if input_size == 0:
- sys.exit("Size parameter is insufficient.")
+ if input_size < (2 * Page.PAGE_PARAMS["max_size"]):
+ sys.exit("Minimum NVS partition size needed is 0x3000 bytes.")