Merge branch 'doc/target_specific_sdkconfig_clarification' into 'master'

docs(build system): Clarified target-specific sdkconfig.defaults usage

See merge request espressif/esp-idf!25851
This commit is contained in:
Jakob Hasse 2023-09-13 20:50:00 +08:00
commit 18244f936b
2 changed files with 2 additions and 4 deletions

View File

@ -144,7 +144,6 @@ To manage the Python version more generally via the command line, check out the
.. _example-project-structure:
Example Project
===============
@ -1058,7 +1057,7 @@ Some of the IDF examples include a ``sdkconfig.ci`` file. This is part of the co
Target-dependent Sdkconfig Defaults
-----------------------------------
In addition to ``sdkconfig.defaults`` file, build system will also load defaults from ``sdkconfig.defaults.TARGET_NAME`` file, where ``TARGET_NAME`` is the value of ``IDF_TARGET``. For example, for ``esp32`` target, default settings will be taken from ``sdkconfig.defaults`` first, and then from ``sdkconfig.defaults.esp32``.
If and only if an ``sdkconfig.defaults`` file exists, the build system will also attempt to load defaults from an ``sdkconfig.defaults.TARGET_NAME`` file, where ``TARGET_NAME`` is the value of ``IDF_TARGET``. For example, for ``esp32`` target, default settings will be taken from ``sdkconfig.defaults`` first, and then from ``sdkconfig.defaults.esp32``. If there are no generic default settings, an empty ``sdkconfig.defaults`` still needs to be created if the build system should recognize any additional target-dependent ``sdkconfig.defaults.TARGET_NAME`` files.
If ``SDKCONFIG_DEFAULTS`` is used to override the name of defaults file/files, the name of target-specific defaults file will be derived from ``SDKCONFIG_DEFAULTS`` value/values using the rule above. When there are multiple files in ``SDKCONFIG_DEFAULTS``, target-specific file will be applied right after the file bringing it in, before all latter files in ``SDKCONFIG_DEFAULTS``

View File

@ -144,7 +144,6 @@ ESP-IDF 适用于 Python 3.8 以上版本。
.. _example-project-structure:
示例项目
========
@ -1058,7 +1057,7 @@ ExternalProject 的依赖与构建清理
依赖于硬件目标的 sdkconfig 默认值
---------------------------------
除了 ``sdkconfig.defaults`` 之外,构建系统还将``sdkconfig.defaults.TARGET_NAME`` 文件加载默认值,其中 ``IDF_TARGET`` 的值为 ``TARGET_NAME``。例如,对于 ``ESP32`` 这个硬件目标sdkconfig 的默认值会首先从 ``sdkconfig.defaults`` 获取,然后再从 ``sdkconfig.defaults.esp32`` 获取。
当且仅当 ``sdkconfig.defaults`` 文件存在时,构建系统还将尝试``sdkconfig.defaults.TARGET_NAME`` 文件加载默认值,其中 ``IDF_TARGET`` 的值为 ``TARGET_NAME``。例如,对于 ``esp32`` 这个目标芯片sdkconfig 的默认值会首先从 ``sdkconfig.defaults`` 获取,然后再从 ``sdkconfig.defaults.esp32`` 获取。当没有通用的默认设置时,仍需创建一个空的 ``sdkconfig.defaults`` 文件,以便构建系统可以识别任何其他与目标芯片相关的 ``sdkconfig.defaults.TARGET_NAME`` 文件。
如果使用 ``SDKCONFIG_DEFAULTS`` 覆盖默认文件的名称,则硬件目标的默认文件名也会从 ``SDKCONFIG_DEFAULTS`` 值中派生。如果 ``SDKCONFIG_DEFAULTS`` 中有多个文件,硬件目标文件会在引入该硬件目标文件的文件之后应用, 而 ``SDKCONFIG_DEFAULTS`` 中所有其它后续文件则会在硬件目标文件之后应用 。