Docs: document inversion in kconfig

This commit is contained in:
Jan Beran 2024-07-23 17:26:42 +08:00 committed by Roland Dobai
parent eba71250ca
commit fdffa19958
2 changed files with 14 additions and 0 deletions

View File

@ -61,6 +61,13 @@ The standard Kconfig_ tools ignore unknown options in ``sdkconfig``. So if a dev
3. ``kconfgen`` post-processes ``sdkconfig`` files and generates all build outputs (``sdkconfig.h``, ``sdkconfig.cmake``, and ``auto.conf``) by adding a list of compatibility statements, i.e., the values of old options are set for new options after modification. If users still use old options in their code, this will prevent it from breaking.
4. :ref:`configuration-deprecated-options` are automatically generated by ``kconfgen``.
The structure of the ``sdkconfig.rename`` file is as follows:
* Lines starting with ``#`` and empty lines will be ignored.
* All other lines should follow one of these formats:
* ``CONFIG_DEPRECATED_NAME CONFIG_NEW_NAME``, where ``CONFIG_DEPRECATED_NAME`` is the old config name which was renamed in a newer ESP-IDF version to ``CONFIG_NEW_NAME``.
* ``CONFIG_DEPRECATED_NAME !CONFIG_NEW_INVERTED_NAME`` where ``CONFIG_NEW_INVERTED_NAME`` was introduced in a newer ESP-IDF version by Boolean inversion of the logic value of ``CONFIG_DEPRECATED_NAME``.
.. _configuration-options-reference:
Configuration Options Reference

View File

@ -61,6 +61,13 @@ Kconfig 选项的向后兼容性
3. ``kconfgen`` 通过添加兼容性语句列表(即经过修改后,将旧选项的值设置为新选项的值),后处理 ``sdkconfig`` 文件,并生成所有构建结果( ``sdkconfig.h````sdkconfig.cmake`` 以及 ``auto.conf``)。如果用户在其代码中仍然使用旧选项,此举可以防止用户代码出现问题。
4. ``kconfgen`` 会自动生成 :ref:`configuration-deprecated-options`
``sdkconfig.rename`` 文件的结构如下:
* 以 ``#`` 开头的行和空行将被忽略。
* 其他所有行应遵循以下格式之一:
* ``CONFIG_DEPRECATED_NAME CONFIG_NEW_NAME``,其中 ``CONFIG_DEPRECATED_NAME`` 是旧配置名称,在较新的 ESP-IDF 版本中已更名为 ``CONFIG_NEW_NAME``
* ``CONFIG_DEPRECATED_NAME !CONFIG_NEW_INVERTED_NAME``,其中 ``CONFIG_NEW_INVERTED_NAME`` 是在较新的 ESP-IDF 版本中通过布尔反转 ``CONFIG_DEPRECATED_NAME`` 的逻辑值而引入的新配置名称。
.. _configuration-options-reference:
配置选项参考