Skip to content

Commit

Permalink
Merge branch 'contrib/github_pr_14159' into 'master'
Browse files Browse the repository at this point in the history
fix(tool/mfg_gen) allow encodings u64 and i64 (GitHub PR)

Closes IDFGH-13224
Closes #14159

See merge request espressif/esp-idf!32175
  • Loading branch information
mahavirj committed Jul 19, 2024
2 parents 7042068 + 5f1916f commit 1c351e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 2 additions & 3 deletions tools/mass_mfg/mfg_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
# SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
#

import argparse
import csv
import distutils.dir_util
import os
from itertools import zip_longest

import distutils.dir_util
import esp_idf_nvs_partition_gen.nvs_partition_gen as nvs_partition_gen


Expand Down Expand Up @@ -72,7 +71,7 @@ def verify_keys_exist(values_file_keys, input_config_file):
def verify_datatype_encoding(input_config_file):
""" Verify datatype and encodings from config file is valid
"""
valid_encodings = {'string', 'binary', 'hex2bin','u8', 'i8', 'u16', 'u32', 'i32','base64'}
valid_encodings = {'string', 'binary', 'hex2bin','u8', 'i8', 'u16', 'u32', 'i32', 'u64', 'i64','base64'}
valid_datatypes = {'file','data','namespace'}

with open(input_config_file,'r') as config_file:
Expand Down
2 changes: 2 additions & 0 deletions tools/mass_mfg/samples/sample_config.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dummyI8Key,data,i8
dummyU16Key,data,u16
dummyU32Key,data,u32
dummyI32Key,data,i32,REPEAT
dummyU64Key,data,u64
dummyI64Key,data,i64
dummyStringKey,data,string
dummyHex2BinKey,data,hex2bin
dummyBase64Key,data,base64
Expand Down
8 changes: 4 additions & 4 deletions tools/mass_mfg/samples/sample_values_multipage_blob.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id,dummyU8Key,dummyI8Key,dummyU16Key,dummyU32Key,dummyI32Key,dummyStringKey,dummyHex2BinKey,dummyBase64Key,hexFileKey,base64FileKey,stringFileKey,blobFileAKey,blobFileBKey,binFileKey
1,127,-128,32768,4294967295,-2147483648,0A:0B:0C:0D:0E:0F,010203abcdef,MTIzYWJj,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_multipage_blob.bin
2,126,-127,32767,4294967294,,A0:B0:C0:D0:E0:F0,102030abcdef,MTIzYWFh,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_multipage_blob.bin
3,125,-126,32766,4294967293,,00:B3:C4:BD:E2:0F,010203efcdab,MTIzYmJi,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_multipage_blob.bin
id,dummyU8Key,dummyI8Key,dummyU16Key,dummyU32Key,dummyI32Key,dummyU64Key,dummyI64Key,dummyStringKey,dummyHex2BinKey,dummyBase64Key,hexFileKey,base64FileKey,stringFileKey,blobFileAKey,blobFileBKey,binFileKey
1,127,-128,32768,4294967295,-2147483648,1125899906842624,1125899906842624,0A:0B:0C:0D:0E:0F,010203abcdef,MTIzYWJj,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_multipage_blob.bin
2,126,-127,32767,4294967294,,1125899906842624,-1125899906842624,A0:B0:C0:D0:E0:F0,102030abcdef,MTIzYWFh,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_multipage_blob.bin
3,125,-126,32766,4294967293,,1125899906842624,-1125899906842624,00:B3:C4:BD:E2:0F,010203efcdab,MTIzYmJi,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_multipage_blob.bin
8 changes: 4 additions & 4 deletions tools/mass_mfg/samples/sample_values_singlepage_blob.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id,dummyU8Key,dummyI8Key,dummyU16Key,dummyU32Key,dummyI32Key,dummyStringKey,dummyHex2BinKey,dummyBase64Key,hexFileKey,base64FileKey,stringFileKey,blobFileAKey,blobFileBKey,binFileKey
1,127,-128,32768,4294967295,-2147483648,0A:0B:0C:0D:0E:0F,010203abcdef,MTIzYWJj,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_singlepage_blob.bin
2,126,-127,32767,4294967294,,A0:B0:C0:D0:E0:F0,102030abcdef,MTIzYWFh,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_singlepage_blob.bin
3,125,-126,32766,4294967293,,00:B3:C4:BD:E2:0F,010203efcdab,MTIzYmJi,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_singlepage_blob.bin
id,dummyU8Key,dummyI8Key,dummyU16Key,dummyU32Key,dummyI32Key,dummyU64Key,dummyI64Key,dummyStringKey,dummyHex2BinKey,dummyBase64Key,hexFileKey,base64FileKey,stringFileKey,blobFileAKey,blobFileBKey,binFileKey
1,127,-128,32768,4294967295,-2147483648,1125899905842624,-1125899906742624,0A:0B:0C:0D:0E:0F,010203abcdef,MTIzYWJj,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_singlepage_blob.bin
2,126,-127,32767,4294967294,,1125899906842600,-1125899906842614,A0:B0:C0:D0:E0:F0,102030abcdef,MTIzYWFh,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_singlepage_blob.bin
3,125,-126,32766,4294967293,,1125899906842624,-1125899906843524,00:B3:C4:BD:E2:0F,010203efcdab,MTIzYmJi,testdata/sample.hex,testdata/sample.base64,testdata/sample.txt,testdata/sample_blob.bin,testdata/sample_blob.bin,testdata/sample_singlepage_blob.bin

0 comments on commit 1c351e5

Please sign in to comment.