summaryrefslogtreecommitdiff
path: root/bin/analyze-kconfig.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-10-11 10:13:01 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-10-11 10:13:01 +0200
commit2518f8d02b488d425a1fe91ca5500e3fa3936030 (patch)
tree57f8a22ba89b4645a93c567e511bc43fc122b628 /bin/analyze-kconfig.py
parentcb4b7204f88fbc914c47ed6fccda18db73ade2df (diff)
analyze-kconfig: obtain meta-data from nfpkeys.json ("make nfpkeys")
Diffstat (limited to 'bin/analyze-kconfig.py')
-rwxr-xr-xbin/analyze-kconfig.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index dc6d187..4a71617 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -137,17 +137,15 @@ def main():
print("TODO")
if args.export_tree:
+ with open("nfpkeys.json", "r") as f:
+ nfpkeys = json.load(f)
complete_json_model = model.to_json(
with_param_name=True, param_names=parameter_names
)
json_model = dict()
for name, attribute_data in complete_json_model["name"].items():
for attribue, data in attribute_data.items():
- # data.update({
- # "unit": "",
- # "description": attribute,
- # "minimize": True
- # })
+ data.update(nfpkeys[name][attribute])
json_model[attribute] = data
with open(args.export_tree, "w") as f:
json.dump(json_model, f, sort_keys=True, cls=dfatool.utils.NpEncoder)