And add tests for hex output formatting in all output formats.
Previously, Make & CMake outputs only formatted hex values with the 0x prefix
if they had the 0x prefix in the sdkconfig file. Now this prefix is always
applied.
Closes https://github.com/espressif/vscode-esp-idf-extension/issues/83
For example, if a renamed option CONFIG_NEW is a bool with value “n”,
kconfiglib will not generate a define for it in the Kconfig file. The
define (#define CONFIG_NEW 1) will only be generated if the option is
“y” or “m”. However the compatibility definition was always
generated: #define CONFIG_OLD CONFIG_NEW. This broke the #ifdef
checks which depended on the old option names.
This commit wraps each compatibility definition:
#ifdef CONFIG_NEW
#define CONFIG_OLD CONFIG_NEW
#endif
so that the CONFIG_OLD definition is only generated if CONFIG_NEW is
defined.
V2 adds:
* Independent result for visibility (showing/hiding menus)
* Includes adding IDs for all items (menus & symbols) in kconfig_menus.json
Still backwards compatible with V1, with some small changes (menu items now listed in results).
Also added some protocol docs, changed the "listening on stdin" message to come after any kconfiglib warnings
When generating JSON metadata for ranges where there are conditional ranges (ie different allowed range
depending on another config setting), the JSON metadata would always have the last named range as
the expression was not evaluated properly.
Thanks to ulfalizer on GitHub for pointing this out.
Closes https://github.com/espressif/esp-idf/issues/2195