From 5a32b53431675b4064e8b3317485ca616dbe4bcb Mon Sep 17 00:00:00 2001 From: daiziyan Date: Mon, 6 Jun 2022 16:21:53 +0800 Subject: [PATCH] docs: udpate CN translation for build-system --- docs/en/api-guides/build-system.rst | 5 ++++- docs/zh_CN/api-guides/build-system.rst | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index e7c98bb0fd..68d276ff32 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -1017,7 +1017,9 @@ Custom sdkconfig defaults For example projects or other projects where you don't want to specify a full sdkconfig configuration, but you do want to override some key values from the ESP-IDF defaults, it is possible to create a file ``sdkconfig.defaults`` in the project directory. This file will be used when creating a new config from scratch, or when any new config value hasn't yet been set in the ``sdkconfig`` file. -To override the name of this file or to specify multiple files, set the ``SDKCONFIG_DEFAULTS`` environment variable or set ``SDKCONFIG_DEFAULTS`` in top-level CMakeLists.txt. If specifying multiple files, use semicolon as the list separator. File names not specified as full paths are resolved relative to current project. +To override the name of this file or to specify multiple files, set the ``SDKCONFIG_DEFAULTS`` environment variable or set ``SDKCONFIG_DEFAULTS`` in top-level ``CMakeLists.txt``. File names that are not specified as full paths are resolved relative to current project's diretory. + +When specifying multiple files, use a semicolon as the list separator. Files listed first will be applied first. If a particular key is defined in multiple files, the definition in the latter file will overide definitions from former files. Some of the IDF examples include a ``sdkconfig.ci`` file. This is part of the continuous integration (CI) test framework and is ignored by the normal build process. @@ -1602,6 +1604,7 @@ No Longer Necessary - In the legacy Make-based build system, it is required to also set ``COMPONENT_SRCDIRS`` if ``COMPONENT_SRCS`` is set. In CMake, the equivalent is not necessary i.e. specifying ``SRC_DIRS`` to ``idf_component_register`` if ``SRCS`` is also specified (in fact, ``SRCS`` is ignored if ``SRC_DIRS`` is specified). + Flashing from make ------------------ diff --git a/docs/zh_CN/api-guides/build-system.rst b/docs/zh_CN/api-guides/build-system.rst index a09eedbf86..6f70d21ea3 100644 --- a/docs/zh_CN/api-guides/build-system.rst +++ b/docs/zh_CN/api-guides/build-system.rst @@ -1017,7 +1017,9 @@ ExternalProject 的依赖与构建清理 对于示例工程或者其他您不想指定完整 sdkconfig 配置的项目,但是您确实希望覆盖 ESP-IDF 默认值中的某些键值,则可以在项目中创建 ``sdkconfig.defaults`` 文件。重新创建新配置时将会用到此文件,另外在 ``sdkconfig`` 没有设置新配置值时,上述文件也会被用到。 -如若需要覆盖此文件的名称或指定多个文件,请设置 ``SDKCONFIG_DEFAULTS`` 环境变量或在顶层 CMakeLists.txt 文件中设置 ``SDKCONFIG_DEFAULTS``。在指定多个文件时,使用分号作为分隔符。未指定完整路径的文件名将以当前项目的相对路径来解析。 +如若需要覆盖此文件的名称或指定多个文件,请设置 ``SDKCONFIG_DEFAULTS`` 环境变量或在顶层 CMakeLists.txt 文件中设置 ``SDKCONFIG_DEFAULTS``。非绝对路径的文件名将以当前项目的相对路径来解析。 + +在指定多个文件时,使用分号作为分隔符。先列出的文件将会先应用。如果某个键值在多个文件里定义,后面文件的定义会覆盖前面文件的定义。 一些 IDF 示例中包含了 ``sdkconfig.ci`` 文件。该文件是 CI(持续集成)测试框架的一部分,在正常构建过程中会被忽略。 @@ -1026,7 +1028,9 @@ ExternalProject 的依赖与构建清理 除了 ``sdkconfig.defaults`` 之外,构建系统还将从 ``sdkconfig.defaults.TARGET_NAME`` 文件加载默认值,其中 ``IDF_TARGET`` 的值为 ``TARGET_NAME``。例如,对于 ``ESP32`` 这个硬件目标,sdkconfig 的默认值会首先从 ``sdkconfig.defaults`` 获取,然后再从 ``sdkconfig.defaults.esp32`` 获取。 -如果使用 ``SDKCONFIG_DEFAULTS`` 覆盖了 sdkconfig 默认文件的名称,则硬件目标的 sdkconfig 默认文件名也会从 ``SDKCONFIG_DEFAULTS`` 值中派生。 +如果使用 ``SDKCONFIG_DEFAULTS`` 覆盖默认文件的名称,则硬件目标的默认文件名也会从 ``SDKCONFIG_DEFAULTS`` 值中派生。如果 ``SDKCONFIG_DEFAULTS`` 中有多个文件,硬件目标文件会在引入该硬件目标文件的文件之后应用, 而 ``SDKCONFIG_DEFAULTS`` 中所有其它后续文件则会在硬件目标文件之后应用 。 + +例如,如果 ``SDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig_devkit1"``,并且在同一文件夹中有一个 ``sdkconfig.defaults.esp32`` 文件,那么这些文件将按以下顺序应用:(1) sdkconfig.defaults (2) sdkconfig.defaults.esp32 (3) sdkconfig_devkit1。 .. _flash_parameters: @@ -1299,6 +1303,7 @@ idf 构建属性 - EXECUTABLE - 项目可执行文件;通过调用 ``idf_build_executable`` 设置。 - EXECUTABLE_NAME - 不含扩展名的项目可执行文件的名称;通过调用 ``idf_build_executable`` 设置。 - EXECUTABLE_DIR - 输出的可执行文件的路径 +- IDF_COMPONENT_MANAGER - 默认启用组件管理器,但如果设置这个属性为`0``,则会被 IDF_COMPONENT_MANAGER 环境变量禁用。 - IDF_PATH - ESP-IDF 路径;由 IDF_PATH 环境变量设置,或者从 ``idf.cmake`` 的位置推断。 - IDF_TARGET - 构建的目标芯片;由 ``idf_build_process`` 的目标参数设置。 - IDF_VER - ESP-IDF 版本;由版本文件或 IDF_PATH 仓库的 Git 版本设置。 @@ -1397,10 +1402,12 @@ idf 组件属性 - KCONFIG - 组件 Kconfig 文件;由 ``idf_build_component`` 设置。 - KCONFIG_PROJBUILD - 组件 Kconfig.projbuild;由 ``idf_build_component`` 设置。 - LDFRAGMENTS - 组件链接器片段文件列表;由 ``idf_component_register`` LDFRAGMENTS 参数设置。 +- MANAGED_PRIV_REQUIRES - IDF 组件管理器从``idf_component.yml``清单文件中的依赖关系中添加的私有组件依赖关系列表。 +- MANAGED_REQUIRES - IDF 组件管理器从 ``idf_component.yml`` 清单文件的依赖关系中添加的公共组件依赖关系列表。 - PRIV_INCLUDE_DIRS - 组件私有 include 目录列表;在 LIBRARY 类型的组件 ``idf_component_register`` PRIV_INCLUDE_DIRS 参数中设置。 -- PRIV_REQUIRES - 私有组件依赖关系列表;由 ``idf_component_register`` PRIV_REQUIRES 参数设置。 +- PRIV_REQUIRES - 私有组件依赖关系列表;根据 ``idf_component_register`` PRIV_REQUIRES 参数的值以及 ``idf_component.yml`` 清单文件中的依赖关系设置。 - REQUIRED_IDF_TARGETS - 组件支持的目标列表;由 ``idf_component_register`` EMBED_TXTFILES 参数设置。 -- REQUIRES - 公共组件依赖关系列表;由 ``idf_component_register`` REQUIRES 参数设置。 +- REQUIRES - 公共组件依赖关系列表;根据 ``idf_component_register`` REQUIRES 参数的值以及 ``idf_component.yml`` 清单文件中的依赖关系设置。 - SRCS - 组件源文件列表;由 ``idf_component_register`` 的 SRCS 或 SRC_DIRS/EXCLUDE_SRCS 参数设置。 .. _cmake-file-globbing: @@ -1599,6 +1606,7 @@ CMake 中不可用的功能 在 CMake 构建系统中,如果设置了 ``COMPONENT_SRCS``,就不需要再设置 ``COMPONENT_SRCDIRS``。实际上,CMake 构建系统中如果设置了 ``COMPONENT_SRCDIRS``,那么 ``COMPONENT_SRCS`` 就会被忽略。 + 从 Make 中烧录 --------------