Skip to content

Commit

Permalink
Merge branch 'docs/update_for_esp_unsynchronized_files' into 'master'
Browse files Browse the repository at this point in the history
docs: Update translations for ESP-IDF unsynchronized files

Closes DOC-6451

See merge request espressif/esp-idf!26353
  • Loading branch information
April-Yjj committed Oct 9, 2023
2 parents 2b5203b + 8dbff6a commit c28bb81
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 39 deletions.
3 changes: 0 additions & 3 deletions docs/en/api-guides/esp-ble-mesh/ble-mesh-terminology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,3 @@ ESP-BLE-MESH Terminology
- The IV Update procedure is used to update the value of ESP-BLE-MESH network's IV Index. This value is related to the random number required for message encryption. To ensure that the value of the random number is not repeated, this value is periodically incremented. IV Index is a 32-bit value and a shared network resource. For example, all nodes in a mesh network share the same IV Index value. Starting from 0x00000000, the IV Index increments during the IV Update procedure and maintained by a specific process, ensuring the IV Index shared in the mesh network is the same. This can be done when the node believes that it has the risk of exhausting its sequence number, or when it determines that another node is nearly exhausting its sequence number. Note: The update time must not be less than 96 hours. It can be triggered when a secure network beacon is received, or when the node determines that its sequence number is greater than a certain value.

For more terms, please see: `ESP-BLE-MESH Glossary of Terms <https://www.bluetooth.com/learn-about-bluetooth/recent-enhancements/mesh/mesh-glossary/>`_.



5 changes: 1 addition & 4 deletions docs/en/api-guides/performance/size.rst
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ The map file itself is broken into parts and each part has a heading. The parts
- If you are wondering why some object file in particular was included in the binary, this part may give a clue. This part can be used in conjunction with the ``Cross Reference Table`` at the end of the file.

.. note::

Not every object file shown in this list ends up included in the final binary, some end up in the ``Discarded input sections`` list instead.

- ``Allocating common symbols``
Expand Down Expand Up @@ -561,6 +561,3 @@ IRAM Binary Size
----------------

If the IRAM section of a binary is too large, this issue can be resolved by reducing IRAM memory usage. See :ref:`optimize-iram-usage`.



12 changes: 6 additions & 6 deletions docs/en/api-reference/protocols/esp_tls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The ESP-TLS component provides an option to set the server certification selecti
The certificate selection callback can be configured in the :cpp:type:`esp_tls_cfg_t` structure as follows:

.. code-block:: c
int cert_selection_callback(mbedtls_ssl_context *ssl)
{
/* Code that the callback should execute */
Expand Down Expand Up @@ -120,7 +120,7 @@ The following table shows a typical comparison between WolfSSL and MbedTLS when
:header-rows: 1
:widths: 40 30 30
:align: center

* - Property
- WolfSSL
- MbedTLS
Expand Down Expand Up @@ -163,7 +163,7 @@ The following table shows a typical comparison between WolfSSL and MbedTLS when

To know more about different types of ATECC608A chips and how to obtain the type of ATECC608A connected to your ESP module, please visit `ATECC608A chip type <https://github.com/espressif/esp-cryptoauthlib/blob/master/esp_cryptoauth_utility/README.md#find-type-of-atecc608a-chip-connected-to-esp32-wroom32-se>`_.

1) Enable the use of ATECC608A in ESP-TLS by providing the following config option in :cpp:type:`esp_tls_cfg_t`.
4) Enable the use of ATECC608A in ESP-TLS by providing the following config option in :cpp:type:`esp_tls_cfg_t`.

.. code-block:: c
Expand Down Expand Up @@ -206,9 +206,9 @@ The following table shows a typical comparison between WolfSSL and MbedTLS when
ECDSA Peripheral with ESP-TLS
-----------------------------

ESP-TLS provides support for using the ECDSA peripheral with {IDF_TARGET_NAME}. The use of ECDSA peripheral is supported only when ESP-TLS is used with MbedTLS as its underlying SSL/TLS stack. The ECDSA private key should be present in the efuse for using the ECDSA peripheral. Please refer to `espefuse.py <https://docs.espressif.com/projects/esptool/en/latest/esp32/espefuse/index.html>`_ documentation for programming the ECDSA key in the efuse.
To use ECDSA peripheral with ESP-TLS, set ``use_ecdsa_peripheral`` to `true` and set ``ecdsa_key_efuse_blk`` to the efuse block id in which ECDSA private key is stored in the :cpp:type:`esp_tls_cfg_t` config structure.
This will enable the use of ECDSA peripheral for private key operations. As the client private key is already present in the eFuse, it need not be supplied to the :cpp:type:`esp_tls_cfg_t` structure.
ESP-TLS provides support for using the ECDSA peripheral with {IDF_TARGET_NAME}. The use of ECDSA peripheral is supported only when ESP-TLS is used with MbedTLS as its underlying SSL/TLS stack. The ECDSA private key should be present in the eFuse for using the ECDSA peripheral. Please refer to `espefuse.py <https://docs.espressif.com/projects/esptool/en/latest/esp32/espefuse/index.html>`__ documentation for programming the ECDSA key in the efuse.
To use ECDSA peripheral with ESP-TLS, set :cpp:member:`esp_tls_cfg_t::use_ecdsa_peripheral` to `true`, and set :cpp:member:`esp_tls_cfg_t::ecdsa_key_efuse_blk` to the eFuse block ID in which ECDSA private key is stored.
This will enable the use of ECDSA peripheral for private key operations. As the client private key is already present in the eFuse, it needs not be supplied to the :cpp:type:`esp_tls_cfg_t` structure.

.. code-block:: c
Expand Down
8 changes: 3 additions & 5 deletions docs/zh_CN/api-guides/esp-ble-mesh/ble-mesh-terminology.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ESP-BLE-MESH Terminology
========================

.. _ble-mesh-terminology-role:

:link_to_translation:`en:[English]`

.. _ble-mesh-terminology-role:

.. list-table:: 表 1 ESP-BLE-MESH 术语 - 身份
:widths: 10 40 60
:header-rows: 1
Expand Down Expand Up @@ -121,6 +121,7 @@ ESP-BLE-MESH Terminology
- Certificate-based Out-of-Band
- 基于证书的配网功能利用公钥基础设施来验证未配网设备的公钥和UUID信息。


.. _ble-mesh-terminology-address:

.. list-table:: 表 5 ESP-BLE-MESH 术语 - 地址
Expand Down Expand Up @@ -277,6 +278,3 @@ ESP-BLE-MESH Terminology

官方定义摘自 `ESP-BLE-MESH Glossary of Terms <https://www.bluetooth.com/learn-about-bluetooth/recent-enhancements/mesh/mesh-glossary/>`_.
查看更多术语,也请参照上述网址。



28 changes: 13 additions & 15 deletions docs/zh_CN/api-guides/performance/size.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ ESP-IDF 构建系统会编译项目和 ESP-IDF 中所有源文件,但只有程
还可以使用 ``diff`` 模式来输出表格,显示组件级(静态库)的差异:

.. note::

运行 ``esp_idf_size`` 时可以使用 ``--format`` 选项输出 JSON 或 CSV 格式的结果。

.. code-block:: bash
Expand All @@ -292,7 +292,7 @@ ESP-IDF 构建系统会编译项目和 ESP-IDF 中所有源文件,但只有程
python -m esp_idf_size --files --diff build_Og/https_request.map build_Oshttps_request.map
了解将输出写入文件等其他选项,可以输入 ``--help`` 查看完整列表。
了解将输出写入文件等其他选项,可以输入 ``--help`` 查看完整列表。

.. _idf-size-linker-failed:

Expand Down Expand Up @@ -331,39 +331,39 @@ ESP-IDF 构建系统会编译项目和 ESP-IDF 中所有源文件,但只有程

映射文件分为多个部分,每个部分各有标题,包括:

- ``Archive member included to satisfy reference by file (symbol)``
- ``Archive member included to satisfy reference by file (symbol)``

- 该列表显示了链接器链接各个目标文件时所搜寻的特定符号(函数或变量)。
- 要了解二进制文件包含特定目标文件的原因,可以查看该列表以及文件末尾的 ``Cross Reference Table``。

.. note::

请注意,并非每个显示在该列表中的目标文件最后都会出现在最终二进制文件中,有些目标文件可能会列在 ``Discarded input sections`` 中。

- ``Allocating common symbols``
- ``Allocating common symbols``

- 该列表显示了部分全局变量及其大小。常见符号在 ELF 二进制文件中具有特定含义,但 ESP-IDF 并未广泛使用这些符号。

- ``Discarded input sections``
- ``Discarded input sections``

- 在链接器读取目标文件时,会将一些输入段作为文件的一部分读取并准备链接到最终的二进制文件中,但由于没有其他部分引用这些输入段,这些段最终会被丢弃。
- 对于 ESP-IDF 项目来说,这个列表可能会非常长,因为我们将每个函数和静态变量都编译到一个独立的段中,以最小化最终二进制文件的大小。具体而言,ESP-IDF 将使用编译器选项 ``-ffunction-sections -fdata-sections`` 和链接器选项 ``--gc-sections``。
- 在这个列表中出现的条目 **不会** 对最终的二进制文件大小产生影响。

- ``Memory Configuration`` 和 ``Linker script and memory map``
- ``Memory Configuration`` 和 ``Linker script and memory map``

- 这两部分相互关联。输出结果的一部分来自由 :doc:`/api-guides/build-system` 提供的链接器命令行和链接脚本,部分链接脚本由 ESP-IDF 项目通过 :doc:`/api-guides/linker-script-generation` 功能生成。

- 在 map 文件的 ``Linker script and memory map`` 输出中,会显示链接到最终二进制文件中的每个符号(函数或静态变量)及其地址(以 16 位十六进制数字表示)和长度(也以十六进制表示),还有链接的库和目标文件(可以用于确定组件和源文件)。

- 在所有占用最终 ``.bin`` 文件的输出段之后, ``memory map`` 还会显示一些 ELF 文件中用于调试的段,如 ``.debug_*`` 等。这些段不会对最终的二进制文件大小产生影响,且这些符号的地址数值很小,从 ``0x0000000000000000`` 开始递增。

- ``Cross Reference Table``
- ``Cross Reference Table``

- 该表格显示了引用了各个符号(函数或静态变量)的目标文件。了解二进制文件包含某个特定符号的原因,可参考该表格以确定引用特定符号的目标文件。

.. note::
.. note::

``Cross Reference Table`` 不仅包含最终二进制文件中的符号,还包含已丢弃的段内符号。因此,某个符号出现在该表中并不意味着最终二进制文件包含这一符号,需要单独检查。


Expand Down Expand Up @@ -411,6 +411,7 @@ ESP-IDF 构建系统会编译项目和 ESP-IDF 中所有源文件,但只有程

- 如果不需要启用 WPA3 支持,禁用 :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_SAE` 可以减小 Wi-Fi 二进制文件的大小。请注意,WPA3 支持是目前认证新 Wi-Fi 设备的必要标准。
- 如果不需要启用 soft-AP 支持,禁用 :ref:`CONFIG_ESP_WIFI_SOFTAP_SUPPORT` 可以减小 Wi-Fi 二进制文件的大小。
- 如不需要启用企业支持,禁用 :ref:`CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT` 可以减小 Wi-Fi 二进制文件的大小。

.. only:: esp32

Expand Down Expand Up @@ -560,6 +561,3 @@ IRAM 二进制文件大小
------------------------------------

如果二进制文件的 IRAM 部分过大,可以通过减少 IRAM 使用来解决这个问题,参阅 :ref:`optimize-iram-usage`。



5 changes: 5 additions & 0 deletions docs/zh_CN/api-reference/network/esp_wifi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ API 参考

.. include-build-file:: inc/esp_wifi.inc
.. include-build-file:: inc/esp_wifi_types.inc
.. include-build-file:: inc/esp_eap_client.inc
.. include-build-file:: inc/esp_wps.inc
.. include-build-file:: inc/esp_rrm.inc
.. include-build-file:: inc/esp_wnm.inc
.. include-build-file:: inc/esp_mbo.inc
1 change: 1 addition & 0 deletions docs/zh_CN/api-reference/network/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Thread 是一种基于 IPv6 的物联网网状网络技术。

ESP-NETIF
=========

.. toctree::
:maxdepth: 1

Expand Down
1 change: 0 additions & 1 deletion docs/zh_CN/api-reference/peripherals/adc_oneshot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ ADC 单次转换模式驱动基于 {IDF_TARGET_NAME} SAR ADC 模块实现,不

ADC IO 及其对应的 ADC 通道编号,请参阅 `技术规格书 <{IDF_TARGET_TRM_CN_URL}>`__。


此外,可以使用 :cpp:func:`adc_continuous_io_to_channel` 和 :cpp:func:`adc_continuous_channel_to_io` 了解 ADC 通道和 ADC IO。

为使以上设置生效,请使用上述配置结构体调用 :cpp:func:`adc_oneshot_config_channel`,并指定要配置的 ADC 通道。函数 :cpp:func:`adc_oneshot_config_channel` 支持多次调用,以配置不同的 ADC 通道。驱动程序将在内部保存每个通道的配置。
Expand Down
1 change: 1 addition & 0 deletions docs/zh_CN/api-reference/peripherals/i2s.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ ESP32-C3 I2S 0 I2S 0 无 I2S 0 无 无
ESP32-C6 I2S 0 I2S 0 无 I2S 0 无 无
ESP32-S3 I2S 0/1 I2S 0 I2S 0 I2S 0/1 无 无
ESP32-H2 I2S 0 I2S 0 无 I2S 0 无 无
ESP32-P4 I2S 0~2 I2S 0 I2S 0 I2S 0~2 无 无
========= ======== ======== ======== ======== ======== ==========

标准模式
Expand Down
30 changes: 26 additions & 4 deletions docs/zh_CN/api-reference/protocols/esp_tls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ ESP-TLS 服务器证书选择回调
证书选择回调可在结构体 :cpp:type:`esp_tls_cfg_t` 中配置,具体如下:

.. code-block:: c
int cert_selection_callback(mbedtls_ssl_context *ssl)
{
/* 回调应执行的代码 */
Expand Down Expand Up @@ -120,7 +120,7 @@ MbedTLS 与 WolfSSL 对比
:header-rows: 1
:widths: 40 30 30
:align: center

* - 属性
- WolfSSL
- MbedTLS
Expand Down Expand Up @@ -163,7 +163,7 @@ MbedTLS 与 WolfSSL 对比

如需了解更多 ATECC608A 芯片类型,或需了解如何获取连接到特定 ESP 模块的 ATECC608A 芯片类型,请参阅 `ATECC608A 芯片类型 <https://github.com/espressif/esp-cryptoauthlib/blob/master/esp_cryptoauth_utility/README.md#find-type-of-atecc608a-chip-connected-to-esp32-wroom32-se>`_。

1) 在 :cpp:type:`esp_tls_cfg_t` 中提供以下配置,在 ESP-TLS 中启用 ATECC608A。
4) 在 :cpp:type:`esp_tls_cfg_t` 中提供以下配置,在 ESP-TLS 中启用 ATECC608A。

.. code-block:: c
Expand Down Expand Up @@ -201,6 +201,28 @@ MbedTLS 与 WolfSSL 对比

* 使用数字签名外设进行双向认证的示例请参阅 :example:`SSL 双向认证 <protocols/mqtt/ssl_mutual_auth>`,该示例使用 ESP-TLS 实现 TLS 连接。

.. only:: SOC_ECDSA_SUPPORTED

在 ESP-TLS 中使用 ECDSA 外设
-----------------------------

ESP-TLS 支持在 {IDF_TARGET_NAME} 中使用 ECDSA 外设。使用 ECDSA 外设时,ESP-TLS 必须与 MbedTLS 一起作为底层 SSL/TLS 协议栈,并且 ECDSA 的私钥应存储在 eFuse 中。请参考 `espefuse.py <https://docs.espressif.com/projects/esptool/en/latest/esp32/espefuse/index.html>`__ 文档,了解如何在 eFuse 中烧写 ECDSA 密钥。
在 ESP-TLS 中启用 ECDSA 外设前,请将 :cpp:member:`esp_tls_cfg_t::use_ecdsa_peripheral` 设置为 `true`,并将 :cpp:member:`esp_tls_cfg_t::ecdsa_key_efuse_blk` 设置为存储了 ECDSA 密钥的 eFuse 块 ID。
这样就可以使用 ECDSA 外设进行私钥操作。由于客户私钥已经存储在 eFuse 中,因此无需将其传递给 :cpp:type:`esp_tls_cfg_t`。

.. code-block:: c
#include "esp_tls.h"
esp_tls_cfg_t cfg = {
.use_ecdsa_peripheral = true,
.ecdsa_key_efuse_blk = /* 存储 ECDSA 私钥的 eFuse 块 */,
};
.. note::

在 TLS 中使用 ECDSA 外设时,只支持 ``MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256`` 密码套件。如果使用 TLS v1.3,则支持 ``MBEDTLS_TLS1_3_AES_128_GCM_SHA256`` 密码套件。


TLS 加密套件
------------------------------------

Expand All @@ -219,7 +241,7 @@ ESP-TLS 支持在客户端模式下设置加密套件列表,TLS 密码套件
ESP-TLS 不会检查 ``ciphersuites_list`` 的有效性,因此需调用 :cpp:func:`esp_tls_get_ciphersuites_list` 获取 TLS 协议栈中支持的加密套件列表,并检查设置的加密套件是否在支持的加密套件列表中。

.. note::

此功能仅在 MbedTLS 协议栈中有效。

API 参考
Expand Down
1 change: 0 additions & 1 deletion docs/zh_CN/hw-reference/esp32c3/user-guide-devkitc-02.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,3 @@ J3
.. _ESP32-C3 技术规格书: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_cn.pdf
.. _ESP32-C3-WROOM-02 规格书: https://www.espressif.com/sites/default/files/documentation/esp32-c3-wroom-02_datasheet_cn.pdf
.. _ESP32-C3-DevKitC-02 原理图: https://dl.espressif.com/dl/schematics/SCH_ESP32-C3-DEVKITC-02_V1_1_20210126A.pdf

0 comments on commit c28bb81

Please sign in to comment.