修改param_cfg_to_code.py

Signed-off-by: laiguizhong <laiguizhong@huawei.com>
This commit is contained in:
laiguizhong 2022-06-01 17:58:06 +08:00
parent 0e7cfe2df8
commit c8c1b0d8e1

View File

@ -64,11 +64,14 @@ def GetParamFromCCode(codeName):
if len(name) != 0 and len(value) != 0:
dict[name] = value
data = afile.readline()
afile.truncate(0)
return dict
def WriteMapToCode(codeName, dict):
try:
f = open(codeName, 'w')
# start with 0
f.seek(0)
# write file header
f.write('#ifndef PARAM_LITE_DEF_CFG_' + os.linesep)
f.write('#define PARAM_LITE_DEF_CFG_' + os.linesep)