From c0c2396612a5ae5d5f4e1acaf75340112863419f Mon Sep 17 00:00:00 2001 From: Jakob Hasse Date: Thu, 7 Sep 2023 18:23:58 +0800 Subject: [PATCH 1/3] docs(build system): Clarified target-specific sdkconfig.defaults usage --- docs/en/api-guides/build-system.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index f08de9d5fd..c94b68ee8d 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -1052,7 +1052,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`` From 19f0c873cb816d6f24b1e2c4b7674f38044632a6 Mon Sep 17 00:00:00 2001 From: Jakob Hasse Date: Thu, 7 Sep 2023 18:23:58 +0800 Subject: [PATCH 2/3] docs(build system): Clarified target-specific sdkconfig.defaults usage --- docs/en/api-guides/build-system.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 4b851da5c2..8a7b586cf0 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -1058,7 +1058,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`` From 9a96be7aefb04b9eb960634e7191e405a1b354f1 Mon Sep 17 00:00:00 2001 From: renpeiying Date: Wed, 13 Sep 2023 14:44:20 +0800 Subject: [PATCH 3/3] docs: Update CN translation for api-guides/build-system.rst --- docs/en/api-guides/build-system.rst | 1 - docs/zh_CN/api-guides/build-system.rst | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 8a7b586cf0..d4aa7ef588 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -144,7 +144,6 @@ To manage the Python version more generally via the command line, check out the .. _example-project-structure: - Example Project =============== diff --git a/docs/zh_CN/api-guides/build-system.rst b/docs/zh_CN/api-guides/build-system.rst index ccc6111162..105b23487b 100644 --- a/docs/zh_CN/api-guides/build-system.rst +++ b/docs/zh_CN/api-guides/build-system.rst @@ -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`` 中所有其它后续文件则会在硬件目标文件之后应用 。