From 60c07e02ad779714ea21139fdf14736a166ade34 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 2 Mar 2022 18:01:08 +0800 Subject: [PATCH] kconfig: fixed non-visible deprecated configs missing from sdkconfig.h Non-visible configs would previously not appear in the deprecated section of the sdkconfig.h, but non-visable configs are used in IDF (and user code) and should therefor be present. --- tools/kconfig_new/confgen.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/kconfig_new/confgen.py b/tools/kconfig_new/confgen.py index 3d4dffd452..ac771304eb 100755 --- a/tools/kconfig_new/confgen.py +++ b/tools/kconfig_new/confgen.py @@ -170,9 +170,13 @@ class DeprecatedOptions(object): def append_header(self, config, path_output): def _opt_defined(opt): - if not opt.visibility: - return False - return not (opt.orig_type in (kconfiglib.BOOL, kconfiglib.TRISTATE) and opt.str_value == 'n') + if opt.orig_type in (kconfiglib.BOOL, kconfiglib.TRISTATE) and opt.str_value != 'n': + opt_defined = True + elif opt.orig_type in (kconfiglib.INT, kconfiglib.STRING, kconfiglib.HEX) and opt.str_value != '': + opt_defined = True + else: + opt_defined = False + return opt_defined if len(self.r_dic) > 0: with open(path_output, 'a') as f_o: