**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 |
**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.
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,
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
# 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