]> granicus.if.org Git - esp-idf/commitdiff
Update mfg utility as per updated nvs partition util
authorShivani Tipnis <shivani@espressif.com>
Tue, 11 Sep 2018 08:13:05 +0000 (13:43 +0530)
committerShivani Tipnis <shivani@espressif.com>
Fri, 12 Oct 2018 05:34:49 +0000 (11:04 +0530)
tools/mass_mfg/docs/README.rst
tools/mass_mfg/mfg_gen.py [changed mode: 0644->0755]

index 4914806d01210c35a3aa7027dcf0294eab0b7251..f71ec7eac867da0420d0be5d0304f96589eae79c 100644 (file)
@@ -115,11 +115,13 @@ The mfg\_gen.py utility is using the generated CSV Configuration file and Master
 
 **Usage**::
 
-    $ ./mfg_gen.py [-h] --conf CONFIG_FILE --values VALUES_FILE --prefix PREFIX [--fileid FILEID] [--outdir OUTDIR]
+    $ ./mfg_gen.py [-h] --size PART_SIZE --conf CONFIG_FILE --values VALUES_FILE --prefix PREFIX [--fileid FILEID] [--outdir OUTDIR]
 
 +------------------------+----------------------------------------------------------------------------------------------+
 |   Arguments            |                                     Description                                              |                                   
 +========================+==============================================================================================+
+| --size PART_SIZE       |  the size of NVS Partition in KB. Eg. 12KB                                                   |
++------------------------+----------------------------------------------------------------------------------------------+
 | --conf CONFIG_FILE     |  the input configuration csv file                                                            |
 +------------------------+----------------------------------------------------------------------------------------------+
 | --values VALUES_FILE   |  the input values csv file                                                                   |
@@ -134,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**::
    
-   $ ./mfg_gen.py --conf sample_config.csv --values sample_values.csv --prefix Fan
+   $ ./mfg_gen.py --size 12KB --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.
old mode 100644 (file)
new mode 100755 (executable)
index 9060dde..56aa61c
@@ -284,6 +284,11 @@ file_identifier=None,output_dir_path=None):
                                              description="Create binary files from input config and values file",
                                              formatter_class=argparse.RawDescriptionHelpFormatter)
 
+            parser.add_argument("--size",
+                                dest='part_size',
+                                required=True,
+                                help='Size of NVS Partition in KB. Eg. 12KB')
+            
             parser.add_argument('--conf',
                                 dest='config_file',
                                 required=True,
@@ -320,6 +325,7 @@ file_identifier=None,output_dir_path=None):
             if not args.outdir.endswith('/'):
                 args.outdir = args.outdir + '/'
 
+            input_part_size = args.part_size
             input_config_file = args.config_file
             input_values_file = args.values_file
             target_file_name_prefix = args.prefix
@@ -472,7 +478,8 @@ file_identifier=None,output_dir_path=None):
 
                 # Create output csv and bin file
                 print "CSV Generated: " + str(output_csv_file)
-                nvs_partition_gen.nvs_part_gen(input_filename = output_csv_file, output_filename = output_bin_file)
+                nvs_partition_gen.nvs_part_gen(input_filename = output_csv_file, output_filename = output_bin_file,\
+                                               input_size=input_part_size)
                 print "NVS Flash Binary Generated: " + str(output_bin_file)
 
                 files_created = True