Update mfg utility as per updated nvs partition util
This commit is contained in:
parent
12bf6e599c
commit
17c907b35e
|
@ -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.
|
||||
|
|
9
tools/mass_mfg/mfg_gen.py
Normal file → Executable file
9
tools/mass_mfg/mfg_gen.py
Normal file → Executable file
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue