Skip to content

Commit 8c8455d

Browse files
committed
Merge branch 'docs/update_cn_translation_for_3files' into 'docs/minimal_build'
docs: Update CN translation for minimal build documentation See merge request espressif/esp-idf!36259
2 parents 90ca881 + a6fdc26 commit 8c8455d

File tree

6 files changed

+32
-30
lines changed

6 files changed

+32
-30
lines changed

docs/en/api-guides/build-system.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ ESP-IDF makes these components explicit and configurable. To do that, when a pro
2525
Concepts
2626
--------
2727

28-
- A "project" is a directory that contains all the files and configuration to build a single "app" (executable), as well as additional supporting elements such as a partition table, data/filesystem partitions, and a bootloader.
28+
- A ``project`` is a directory that contains all the files and configuration to build a single ``app`` (executable), as well as additional supporting elements such as a partition table, data partitions or filesystem partitions, and a bootloader.
2929

30-
- "Project configuration" is held in a single file called ``sdkconfig`` in the root directory of the project. This configuration file is modified via ``idf.py menuconfig`` to customize the configuration of the project. A single project contains exactly one project configuration.
30+
- ``Project configuration`` is held in a single file called ``sdkconfig`` in the root directory of the project. This configuration file is modified via ``idf.py menuconfig`` to customize the configuration of the project. A single project contains exactly one project configuration.
3131

32-
- An "app" is an executable that is built by ESP-IDF. A single project will usually build two apps - a "project app" (the main executable, ie your custom firmware) and a "bootloader app" (the initial bootloader program which launches the project app).
32+
- An ``app`` is an executable that is built by ESP-IDF. A single project will usually build two apps - a "project app" (the main executable, ie your custom firmware) and a "bootloader app" (the initial bootloader program which launches the project app).
3333

34-
- "components" are modular pieces of standalone code that are compiled into static libraries (.a files) and linked to an app. Some are provided by ESP-IDF itself, others may be sourced from other places.
34+
- ``Components`` are modular pieces of standalone code that are compiled into static libraries (.a files) and linked to an app. Some are provided by ESP-IDF itself, others may be sourced from other places.
3535

36-
- "Target" is the hardware for which an application is built. A full list of supported targets in your version of ESP-IDF can be seen by running `idf.py --list-targets`.
36+
- ``Target`` is the hardware for which an application is built. A full list of supported targets in your version of ESP-IDF can be seen by running `idf.py --list-targets`.
3737

3838
Some things are not part of the project:
3939

40-
- "ESP-IDF" is not part of the project. Instead, it is standalone, and linked to the project via the ``IDF_PATH`` environment variable which holds the path of the ``esp-idf`` directory. This allows the ESP-IDF framework to be decoupled from your project.
40+
- ``ESP-IDF`` is not part of the project. Instead, it is standalone, and linked to the project via the ``IDF_PATH`` environment variable which holds the path of the ``esp-idf`` directory. This allows the ESP-IDF framework to be decoupled from your project.
4141

4242
- The toolchain for compilation is not part of the project. The toolchain should be installed in the system command line PATH.
4343

@@ -47,22 +47,22 @@ Using the Build System
4747

4848
.. _idf.py:
4949

50-
``idf.py``
51-
----------
50+
idf.py
51+
------
5252

5353
The ``idf.py`` command-line tool provides a front-end for easily managing your project builds. It manages the following tools:
5454

5555
- CMake_, which configures the project to be built
5656
- Ninja_ which builds the project
5757
- `esptool.py`_ for flashing the target.
5858

59-
You can read more about configuring the build system using ``idf.py`` :doc:`here <tools/idf-py>`.
59+
For more details about configuring the build system using ``idf.py``, please refer to :doc:`IDF Frontend <tools/idf-py>`.
6060

6161

6262
Using CMake Directly
6363
--------------------
6464

65-
:ref:`idf.py` is a wrapper around CMake_ for convenience. However, you can also invoke CMake directly if you prefer.
65+
:ref:`idf.py` is a wrapper around CMake_ for convenience. However, you can also invoke CMake directly.
6666

6767
.. highlight:: bash
6868

@@ -125,7 +125,6 @@ When adding custom non-build steps like "flash" to the IDE, it is recommended to
125125

126126
For more detailed information about integrating ESP-IDF with CMake into an IDE, see `Build System Metadata`_.
127127

128-
129128
.. _setting-python-interpreter:
130129

131130
Setting up the Python Interpreter
@@ -621,6 +620,7 @@ Including Components in the Build
621620
- The ``MINIMAL_BUILD`` :ref:`build property <cmake-build-properties>` can be set to ``ON``, which acts as a shortcut to configure the ``COMPONENTS`` variable to include only the ``main`` component. This means that the build will include only the :ref:`common components <component-common-requirements>`, the ``main`` component, and all dependencies associated with it, both direct and indirect. If the ``COMPONENTS`` variable is defined while the ``MINIMAL_BUILD`` property is enabled, ``COMPONENTS`` will take precedence.
622621

623622
.. note::
623+
624624
Certain features and configurations, such as those provided by esp_psram or espcoredump components, may not be available to your project by default if the minimal list of components is used. When using the ``COMPONENTS`` variable, ensure that all necessary components are included. Similarly, when using the ``MINIMAL_BUILD`` build property, ensure that all required components are specified in the ``REQUIRES`` or ``PRIV_REQUIRES`` argument during component registration.
625625

626626
.. _component-circular-dependencies:

docs/en/api-guides/core_dump.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Configurations
1717
--------------
1818

1919
.. note::
20-
The ``Core dump`` configuration options are available only if the ``espcoredump`` component is included in the build. To include ``Core dump`` into your project, add the ``espcoredump`` component as a dependency in either REQUIRES or PRIV_REQUIRES when registering your component with ``idf_component_register``.
20+
21+
The ``Core dump`` configuration options are available only if the ``espcoredump`` component is included in the build. To include ``Core dump`` into your project, add the ``espcoredump`` component as a dependency in either ``REQUIRES`` or ``PRIV_REQUIRES`` when registering your component with ``idf_component_register``.
2122

2223
Destination
2324
^^^^^^^^^^^

docs/en/api-guides/external-ram.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ Configuring External RAM
4747
========================
4848

4949
.. note::
50-
The ``SPI RAM`` configuration options are available only if the ``esp_psram`` component is included in the build. To include ``SPI RAM`` into your project, add the ``esp_psram`` component as a dependency in either REQUIRES or PRIV_REQUIRES when registering your component with ``idf_component_register``.
50+
51+
The ``SPI RAM`` configuration options are available only if the ``esp_psram`` component is included in the build. To include ``SPI RAM`` into your project, add the ``esp_psram`` component as a dependency in either ``REQUIRES`` or ``PRIV_REQUIRES`` when registering your component with ``idf_component_register``.
5152

5253
ESP-IDF fully supports the use of external RAM in applications. Once the external RAM is initialized at startup, ESP-IDF can be configured to integrate the external RAM in several ways:
5354

docs/zh_CN/api-guides/build-system.rst

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ESP-IDF 可以显式地指定和配置每个组件。在构建项目的时候,
2525
概念
2626
----
2727

28-
- ``项目`` 特指一个目录,其中包含了构建可执行应用程序所需的全部文件和配置,以及其他支持型文件,例如分区表、数据/文件系统分区和引导加载程序
28+
- ``项目`` 特指一个目录,其中包含了构建 ``应用程序`` (即可执行文件)所需的全部文件和配置,还包含了其他支持型文件,例如分区表、数据分区或文件系统分区,以及引导加载程序
2929

3030
- ``项目配置`` 保存在项目根目录下名为 ``sdkconfig`` 的文件中,可以通过 ``idf.py menuconfig`` 进行修改,且一个项目只能包含一个项目配置。
3131

@@ -48,25 +48,25 @@ ESP-IDF 可以显式地指定和配置每个组件。在构建项目的时候,
4848
.. _idf.py:
4949

5050
idf.py
51-
--------
51+
------
5252

5353
``idf.py`` 命令行工具提供了一个前端,可以帮助你轻松管理项目的构建过程,它管理了以下工具:
5454

5555
- CMake_,配置待构建的项目
5656
- Ninja_,用于构建项目
5757
- `esptool.py`_,烧录目标硬件设备
5858

59-
可通过 ``idf.py`` 配置构建系统,具体可参考 :doc:`相关文档 <tools/idf-py>`。
59+
可通过 ``idf.py`` 配置构建系统,具体可参考 :doc:`IDF 前端工具 <tools/idf-py>`。
6060

6161

6262
直接使用 CMake
6363
--------------
6464

65-
为了方便,:ref:`idf.py` 已经封装了 CMake_ 命令,但是你愿意,也可以直接调用 CMake。
65+
为了方便,:ref:`idf.py` 已经封装了 CMake_ 命令。你也可以直接调用 CMake。
6666

6767
.. highlight:: bash
6868

69-
当 ``idf.py`` 在执行某些操作时,它会打印出其运行的每条命令以便参考。例如运行 ``idf.py build`` 命令与在 bash shell(或者 Windows Command Prompt)中运行以下命令是相同的::
69+
当 ``idf.py`` 在执行某些操作时,它会打印运行的每条命令以便参考。例如,运行 ``idf.py build`` 命令等同于在 bash shell 中运行以下命令(或在 Windows 命令提示符中运行类似的命令)::
7070

7171
mkdir -p build
7272
cd build
@@ -79,7 +79,7 @@ idf.py
7979

8080
若在 CMake 中使用 ``ninja`` 或 ``make``,则多数 ``idf.py`` 子命令也会有其对应的目标,例如在构建目录下运行 ``make menuconfig`` 或 ``ninja menuconfig`` 与运行 ``idf.py menuconfig`` 是相同的。
8181

82-
.. Note::
82+
.. note::
8383

8484
如果你已经熟悉了 CMake_,那么可能会发现 ESP-IDF 的 CMake 构建系统不同寻常,为了减少样板文件,该系统封装了 CMake 的许多功能。请参考 :ref:`write-pure-component` 以编写更多 “CMake 风格”的组件。
8585

@@ -103,15 +103,15 @@ idf.py
103103

104104
ESPPORT=/dev/ttyUSB0 ninja flash
105105

106-
.. Note::
106+
.. note::
107107

108108
在命令的开头为环境变量赋值属于 Bash shell 的语法,可在 Linux 、macOS 和 Windows 的类 Bash shell 中运行,但在 Windows Command Prompt 中无法运行。
109109

110110
或::
111111

112112
make -j3 app-flash ESPPORT=COM4 ESPBAUD=2000000
113113

114-
.. Note::
114+
.. note::
115115

116116
在命令末尾为变量赋值属于 ``make`` 的语法,适用于所有平台的 ``make``。
117117

@@ -127,7 +127,6 @@ idf.py
127127

128128
.. _setting-python-interpreter:
129129

130-
131130
设置 Python 解释器
132131
------------------
133132

@@ -602,7 +601,7 @@ Spark Plug 组件
602601
通用组件依赖项
603602
--------------
604603

605-
为避免重复性工作,各组件都用自动依赖一些“通用”IDF 组件,即使它们没有被明确提及。这些组件的头文件会一直包含在构建系统中。
604+
为避免重复性工作,各组件都用自动依赖一些“通用” IDF 组件,即使它们没有被明确提及。这些组件的头文件会一直包含在构建系统中。
606605

607606
通用组件包括:cxx、newlib、freertos、esp_hw_support、heap、log、soc、hal、esp_rom、esp_common、esp_system。
608607

@@ -615,15 +614,14 @@ Spark Plug 组件
615614

616615
* ``COMPONENTS`` 中明确提及的组件。
617616
* 这些组件的依赖项(以及递归运算后的组件)。
618-
* 每个组件都依赖的通用组件
617+
* 每个组件都依赖的 :ref:`通用组件 <component-common-requirements>`
619618

620619
- 将 ``COMPONENTS`` 设置为所需组件的最小列表,可以显著减少项目的构建时间。
621-
- 可以将 ``MINIMAL_BUILD`` :ref:`构建属性 <cmake-build-properties>` 设为 ``ON``,从而快捷配置 ``COMPONENTS`` 变量,使其仅包含 ``main`` 组件。如果在启用 ``MINIMAL_BUILD`` 属性的同时定义了 ``COMPONENTS`` 变量,则 ``COMPONENTS`` 会优先生效。
620+
- 可以将 ``MINIMAL_BUILD`` :ref:`构建属性 <cmake-build-properties>` 设为 ``ON``,从而快捷配置 ``COMPONENTS`` 变量,使其仅包含 ``main`` 组件。构建过程将仅包括 :ref:`通用组件 <component-common-requirements>`、``main`` 组件和所有相关依赖项(包括直接和间接依赖)。如果在启用 ``MINIMAL_BUILD`` 属性的同时定义了 ``COMPONENTS`` 变量,则 ``COMPONENTS`` 会优先生效。
622621

623622
.. note::
624623

625-
使用 ``COMPONENTS`` 变量或 ``MINIMAL_BUILD`` 构建属性指定组件时,一些功能和配置(如 esp_psram 或 espcoredump 组件提供的功能和配置)可能不会被默认包含。如需使用这些功能,须将相关组件添加到 ``COMPONENTS`` 变量中,或在组件注册时将其列入 ``REQUIRES`` 或 ``PRIV_REQUIRES`` 参数。
626-
624+
如果使用最小组件列表,某些功能和配置(如 esp_psram 或 espcoredump 组件提供的功能和配置)可能默认无法在项目中使用。使用 ``COMPONENTS`` 变量时,请确保包含所有必要的组件。同样地,使用 ``MINIMAL_BUILD`` 构建属性时,请确保在组件注册时通过 ``REQUIRES`` 或 ``PRIV_REQUIRES`` 参数指定所有所需组件。
627625

628626
.. _component-circular-dependencies:
629627

docs/zh_CN/api-guides/core_dump.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
--------------
1818

1919
.. note::
20-
只有在构建中包含 ``espcoredump`` 组件时,``Core dump`` 配置选项才可用。
20+
21+
只有在构建中包含 ``espcoredump`` 组件时,``Core dump`` 配置选项才可用。要在项目中包含 ``Core dump`` 功能,在使用 ``idf_component_register`` 注册组件时,将 ``espcoredump`` 组件添加为 ``REQUIRES`` 或 ``PRIV_REQUIRES`` 的依赖项。
2122

2223
目标
2324
^^^^^^^^^^^

docs/zh_CN/api-guides/external-ram.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@
4747
========================
4848

4949
.. note::
50-
只有在构建中包含 ``esp_psram`` 组件时,``SPI RAM`` 配置选项才可用。
50+
51+
只有在构建中包含 ``esp_psram`` 组件时,``SPI RAM`` 配置选项才可用。要在项目中包含 ``SPI RAM`` 功能,使用 ``idf_component_register`` 注册组件时,将 ``esp_psram`` 组件添加为 ``REQUIRES`` 或 ``PRIV_REQUIRES`` 的依赖项。
5152

5253
ESP-IDF 完全支持将片外 RAM 集成到你的应用程序中。在启动并完成片外 RAM 初始化后,可以将 ESP-IDF 配置为用多种方式处理片外 RAM:
5354

5455
.. list::
5556

5657
* :ref:`external_ram_config_memory_map`
5758
* :ref:`external_ram_config_capability_allocator`
58-
* :ref:`external_ram_config_malloc` (default)
59+
* :ref:`external_ram_config_malloc` (默认方式)
5960
* :ref:`external_ram_config_bss`
6061
* :ref:`external_ram_config_noinit`
6162
:SOC_SPIRAM_XIP_SUPPORTED: * :ref:`external_ram_config_xip`

0 commit comments

Comments
 (0)