]> granicus.if.org Git - esp-idf/commitdiff
nvs_part_gen: Add changes to partition size input
authorShivani Tipnis <shivani@espressif.com>
Mon, 8 Oct 2018 05:41:56 +0000 (11:11 +0530)
committerShivani Tipnis <shivani@espressif.com>
Fri, 12 Oct 2018 05:34:49 +0000 (11:04 +0530)
components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py
tools/mass_mfg/mfg_gen.py

index d0c5297918d54cdc0d8f0252369a28872bedf6ee..003d1bab9ba2cd699c93e4bce515beb194d80c1f 100755 (executable)
@@ -193,7 +193,6 @@ class Page(object):
 
             data_val = data_bytes + (init_data_val * (data_len_needed - len(data_bytes)))
             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
             # Update values for encrypting next set of data bytes
             start_idx = end_idx
@@ -212,7 +211,7 @@ class Page(object):
                 encr_data[0:len(encr_data_ret)] = encr_data_ret
             else:
                 encr_data[0:len(encr_data_ret)] = encr_data_ret
-            
+
             data = encr_data
 
         data_offset = Page.FIRST_ENTRY_OFFSET + (Page.SINGLE_ENTRY_SIZE * self.entry_num)
index 255aa50b10170c5c985de832c67d7e85cf7abc4b..ca9c94cb049b4b28ca48d5d5b44acc42bb1e8bc1 100755 (executable)
@@ -22,9 +22,10 @@ import csv
 import argparse
 import shutil
 import distutils.dir_util
-from itertools import zip_longest
 sys.path.insert(0, os.getenv('IDF_PATH') + "/components/nvs_flash/nvs_partition_generator/")
 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):
     """ Verify all keys have corresponding values in values file
@@ -307,7 +308,7 @@ file_identifier=None,output_dir_path=None):
                                 dest='part_size',
                                 required=True,
                                 help='Size of NVS Partition in hex (must be multiple of 4096). Eg. 0x1000')
-            
+
             parser.add_argument('--conf',
                                 dest='config_file',
                                 required=True,