Shivani Tipnis 2018-11-13 17:07:14 +05:30
parent 9db1987892
commit c44f15441f
2 changed files with 6 additions and 4 deletions

View file

@ -166,6 +166,8 @@ A sample CSV file is provided with the utility::
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

View file

@ -593,7 +593,7 @@ class InsufficientSizeError(RuntimeError):
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
@ -691,13 +691,13 @@ encrypt_mode=None, key_file=None, version_no=None, print_arg_str=None, print_enc
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.")