Skip to content

Commit bc5ba26

Browse files
committed
docs: Provide CN translation for three additionalfeatures docs
1 parent 3ae9b40 commit bc5ba26

File tree

6 files changed

+178
-52
lines changed

6 files changed

+178
-52
lines changed
Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
ESP-IDF Application Size Analysis
2-
===================================
2+
=================================
33

4-
The Application Size Analysis editor provides a way to analyze the static memory footprint of your application. It has two sections:
4+
:link_to_translation:`zh_CN:[中文]`
55

6-
- The **Overview** section provides a summary of the application's memory usage;
7-
- The **Details** section includes in-depth details about components and per-symbol level memory information.
6+
The Application Size Analysis editor helps you examine your application's static memory usage. It has two sections:
87

9-
The **Details** table viewer also provides searching and sorting capabilities on various columns.
8+
- ``Overview``: Summarizes the application's memory usage.
9+
- ``Details``: Shows detailed component and per-symbol memory information, with search and sort features.
1010

1111
To launch the Application Size Analysis editor:
1212

1313
#. Right-click on the project.
14-
#. Select **ESP-IDF > Application Size Analysis** menu option to launch the editor.
14+
#. Select ``ESP-IDF: Application Size Analysis`` menu option to launch the editor.
1515

16-
**Application Size Analysis - Overview**
17-
18-
.. image:: ../../../media/sizeanalysis_overview.png
16+
.. figure:: ../../../media/sizeanalysis_overview.png
17+
:align: center
1918
:alt: Application Size Analysis - Overview
2019

21-
**Application Size Analysis - Details**
20+
Application Size Analysis – Overview
21+
2222

23-
.. image:: ../../../media/sizeanalysis_details.png
23+
.. figure:: ../../../media/sizeanalysis_details.png
24+
:align: center
2425
:alt: Application Size Analysis - Details
26+
27+
Application Size Analysis – Details

docs/en/additionalfeatures/gdbstubdebugging.rst

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,49 @@
22

33
GDBStub Debugging
44
=================
5-
You can now use the GDBStub debugging inside our Eclipse plugin to help you diagnose and debug issues on chips via Eclipse when it is in panic mode.
5+
6+
:link_to_translation:`zh_CN:[中文]`
7+
8+
You can now use the GDBStub debugging in the Eclipse plugin to diagnose and debug chip issues when the chip enters panic mode.
69

710
To enable GDBStub debugging for a project:
811

9-
1. Launch the `sdkconfig` in project root by double-clicking on it which will open the configuration editor.
12+
1. Launch the ``sdkconfig`` file in the project root by double-clicking it. This will open the configuration editor.
1013

11-
.. image:: ../../../media/GDBStubDebugging/sdkconfig_editor.png
14+
.. image:: ../../../media/GDBStubDebugging/sdkconfig_editor.png
1215

13-
2. Expand the `Component Config` section and select `ESP System Settings`. From the settings on the right for `Panic Handler behaviour` select the `GDBStub on Panic option` from the list.
16+
2. Expand the ``Component Config`` section and select ``ESP System Settings``. From the settings on the right for ``Panic handler behaviour`` select the ``GDBStub on panic`` option from the list.
1417

15-
.. image:: ../../../media/GDBStubDebugging/sdkconfig_editor_panic_behavior.png
18+
.. image:: ../../../media/GDBStubDebugging/sdkconfig_editor_panic_behavior.png
1619

17-
Now you will be taken to the GDBStub debugger automatically when you connect the serial monitor and there is a panic for this example.
20+
When you connect the serial monitor and a panic occurs in this example, the GDBStub debugger will be launched automatically.
1821

1922
To use the GDBStub debugging for a project:
2023

21-
1. Create a template `hello_world` project and add the following lines in the main C file:
24+
1. Create a template ``hello_world`` project and add the following lines in the ``main.c`` file:
2225

23-
.. code-block:: c
26+
.. code-block:: c
2427
25-
This is a global variable<br/>
26-
COREDUMP_DRAM_ATTR uint8_t global_var;
28+
// This is a global variable
29+
COREDUMP_DRAM_ATTR uint8_t global_var;
2730
28-
2. Now add these two lines just above the `esp_restart()` function:
31+
2. Now add these two lines just above the ``esp_restart()`` function:
2932

30-
.. code-block:: c
33+
.. code-block:: c
3134
32-
global_var = 25;
33-
assert(0);
35+
global_var = 25;
36+
assert(0);
3437
35-
The final file should be something like this:
38+
The final file should look like the following:
3639

3740
.. image:: ../../../media/GDBStubDebugging/code_example.png
3841

39-
Build and flash the project and launch the serial monitor. On line number 45, we are signaling for a failing assert which will put the chip in panic mode and when that line reaches, you will be prompted to switch the perspective to debug mode and the chip will be halted.
42+
Build and flash the project, then launch the serial monitor. At line 45, a failing assert is triggered, which puts the chip into panic mode. When execution reaches this line, you will be prompted to switch to the Debug perspective, and the chip will be halted.
4043

41-
Remember that this is a panic mode and you cannot continue the execution from here, you will have to stop and restart the chip through IDF commands or simply restart the serial monitor.
44+
The chip is in panic mode, and execution cannot continue from this point. You must stop and restart the chip using IDF commands or by restarting the serial monitor.
4245

4346
.. image:: ../../../media/GDBStubDebugging/debug_panic_mode.png
4447

45-
You can view the registers stack trace and even view the value of variables in the stack frame.
46-
47-
To exit the debug session simply press the `stop` button.
48+
You can view the registers, stack trace, and even the value of variables in the stack frame.
4849

50+
To exit the debug session, simply press the ``stop`` button.
Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
NVS Table Editor
22
================
33

4-
The NVS Table Editor helps create a binary file based on key-value pairs provided in a CSV file. The resulting binary file is compatible with the NVS architecture as defined in `ESP-IDF Non Volatile Storage <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/nvs_flash.html>`_. The expected CSV format is:
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
The NVS Table Editor helps create a binary file based on key-value pairs provided in a CSV file. The resulting binary file is compatible with the NVS architecture as defined in ESP-IDF `Non-Volatile Storage <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/nvs_flash.html>`_. The expected CSV format is:
57

68
.. code-block:: text
79
8-
key,type,encoding,value <-- column header (must be the first line)
9-
namespace_name,namespace,, <-- First entry must be of type "namespace"
10-
key1,data,u8,1
11-
key2,file,string,/path/to/file
10+
key,type,encoding,value <-- column header (must be the first line)
11+
namespace_name,namespace,, <-- First entry must be of type "namespace"
12+
key1,data,u8,1
13+
key2,file,string,/path/to/file
14+
15+
.. note::
1216

13-
.. note:: This is based on ESP-IDF `NVS Partition Generator Utility <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/nvs_partition_gen.html>`_.
17+
This is based on ESP-IDF `NVS Partition Generator Utility <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/nvs_partition_gen.html>`_.
1418

1519
Steps
1620
-----
1721

18-
1. Right-click on a project in the *Project Explorer*.
19-
2. Click on the *ESP-IDF > NVS Table Editor* menu option:
22+
1. Right-click on a project in the Project Explorer.
23+
2. Click on the ``ESP-IDF: NVS Table Editor`` menu option.
24+
25+
.. image:: https://user-images.githubusercontent.com/24419842/216114697-9f231211-f5dd-431b-9432-93ecc656cfec.png
26+
:alt: NVS Table Editor menu option
2027

21-
.. image:: https://user-images.githubusercontent.com/24419842/216114697-9f231211-f5dd-431b-9432-93ecc656cfec.png
22-
:alt: NVS Table Editor menu option
28+
3. Make desired changes to the CSV data.
29+
4. Save changes by clicking the ``Save`` button. If everything is correct, you will see an information message at the top of the dialog:
2330

24-
3. Make desired changes to the CSV data.
25-
4. Save changes by clicking the *Save* button. If everything is correct, you will see an information message at the top of the dialog:
31+
.. image:: https://user-images.githubusercontent.com/24419842/216115906-9bb4fe55-293b-4c6b-8d22-0aa3520581ab.png
32+
:alt: Save confirmation in NVS Table Editor
2633

27-
.. image:: https://user-images.githubusercontent.com/24419842/216115906-9bb4fe55-293b-4c6b-8d22-0aa3520581ab.png
28-
:alt: Save confirmation in NVS Table Editor
34+
5. Generate the partition binary. Choose ``Encrypt`` to encrypt the binary, and disable the ``Generate Key`` option if you want to use your own key. An information message will appear at the top of the dialog showing the result of the generated binaries. Hover over the message to view the full content if it is truncated:
2935

30-
5. Generate the partition binary (choose *Encrypt* to encrypt the binary, and disable the *Generate Key* option to use your own key if desired). You will see an information message at the top of the dialog about the result of the generated binaries. Hover over the message if it's too long to read fully:
36+
.. image:: https://user-images.githubusercontent.com/24419842/216117261-9bee798a-3a9e-4be5-9466-fc9d3847834b.png
37+
:alt: Binary generation result in NVS Table Editor
3138

32-
.. image:: https://user-images.githubusercontent.com/24419842/216117261-9bee798a-3a9e-4be5-9466-fc9d3847834b.png
33-
:alt: Binary generation result in NVS Table Editor
39+
.. note::
3440

35-
.. note:: If there are any errors, they will be highlighted. Hover over the error icon to read more about the error. You will also see an error message at the top of
41+
If there are any errors, they will be highlighted. Hover over the error icon to read more about the error. An error message will also appear at the top of the dialog.
Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1-
.. include:: ../../en/additionalfeatures/application-size-analysis.rst
1+
ESP-IDF 应用程序大小分析
2+
========================
3+
4+
:link_to_translation:`en:[English]`
5+
6+
应用程序大小分析编辑器可用于分析应用的静态内存占用情况。该编辑器包含两个部分:
7+
8+
- ``Overview``:总结应用程序的内存使用情况。
9+
- ``Details``:显示组件级和符号级的详细内存信息,并提供搜索和排序功能。
10+
11+
可参照下列步骤启动应用程序大小分析编辑器:
12+
13+
#. 右键单击你的项目。
14+
#. 选择 ``ESP-IDF: Application Size Analysis`` 菜单选项以启动编辑器。
15+
16+
.. figure:: ../../../media/sizeanalysis_overview.png
17+
:align: center
18+
:alt: 应用大小分析 — 概览
19+
20+
应用程序大小分析 – 概览
21+
22+
23+
.. figure:: ../../../media/sizeanalysis_details.png
24+
:align: center
25+
:alt: 应用大小分析 — 详细信息
26+
27+
应用程序大小分析 – 详细信息
Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
.. include:: ../../en/additionalfeatures/gdbstubdebugging.rst
1+
.. _gdbstubdebugging:
2+
3+
GDBStub 调试
4+
============
5+
6+
:link_to_translation:`en:[English]`
7+
8+
你可以在 Eclipse 插件中使用 GDBStub 调试功能,在芯片进入 panic 模式时诊断和调试相关问题。
9+
10+
可参照下列步骤为项目启用 GDBStub 调试:
11+
12+
1. 在项目根目录中双击 ``sdkconfig``,打开配置编辑器。
13+
14+
.. image:: ../../../media/GDBStubDebugging/sdkconfig_editor.png
15+
16+
2. 展开 ``Component Config`` 部分并选择 ``ESP System Settings``。在右侧设置中,将 ``Panic handler behaviour`` 设为列表中的 ``GDBStub on Panic`` 选项。
17+
18+
.. image:: ../../../media/GDBStubDebugging/sdkconfig_editor_panic_behavior.png
19+
20+
当连接串口监视器且此示例发生 panic 时,将自动进入 GDBStub 调试器。
21+
22+
参照下列步骤在项目中使用 GDBStub 调试:
23+
24+
1. 创建 ``hello_world`` 模板项目,并在 ``main.c`` 文件中加入以下内容:
25+
26+
.. code-block:: c
27+
28+
// 这是一个全局变量
29+
COREDUMP_DRAM_ATTR uint8_t global_var;
30+
31+
2. 现在在 ``esp_restart()`` 函数的上方加入下面两行代码:
32+
33+
.. code-block:: c
34+
35+
global_var = 25;
36+
assert(0);
37+
38+
最终生成的文件应如下所示:
39+
40+
.. image:: ../../../media/GDBStubDebugging/code_example.png
41+
42+
构建并烧录项目,然后启动串口监视器。在第 45 行,会触发一个失败的断言,导致芯片进入 panic 模式。当程序执行到该行时,IDE 会提示你切换到调试模式,并暂停芯片执行。
43+
44+
此时芯片处于 panic 模式,无法继续执行程序。必须通过 IDF 命令停止并重启芯片,或者直接重启串口监视器。
45+
46+
.. image:: ../../../media/GDBStubDebugging/debug_panic_mode.png
47+
48+
你可以查看寄存器、栈回溯以及栈帧中的变量值。
49+
50+
若要退出调试会话,只需点击 ``stop`` 按钮。
Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
.. include:: ../../en/additionalfeatures/nvspartitioneditor.rst
1+
NVS 表格编辑器
2+
==============
3+
4+
:link_to_translation:`en:[English]`
5+
6+
NVS 表格编辑器可根据 CSV 文件中的键值对创建二进制文件。生成的二进制文件与 ESP-IDF `非易失性存储库 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-reference/storage/nvs_flash.html>`_ 中定义的 NVS 架构兼容。CSV 格式应如下所示:
7+
8+
.. code-block:: text
9+
10+
key,type,encoding,value <-- 列标题,必须是第一行
11+
namespace_name,namespace,, <-- 第一条目类型必须为 "namespace"
12+
key1,data,u8,1
13+
key2,file,string,/path/to/file
14+
15+
.. note::
16+
17+
此功能基于 ESP-IDF `NVS 分区生成程序 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-reference/storage/nvs_partition_gen.html>`_。
18+
19+
操作步骤
20+
--------
21+
22+
1. 在资源管理器中右键单击某个项目。
23+
2. 点击 ``ESP-IDF: NVS Table Editor`` 菜单选项。
24+
25+
.. image:: https://user-images.githubusercontent.com/24419842/216114697-9f231211-f5dd-431b-9432-93ecc656cfec.png
26+
:alt: NVS 表格编辑器菜单选项
27+
28+
3. 按需修改 CSV 数据。
29+
4. 点击 ``Save`` 按钮保存更改。若配置正确,则将在对话框顶部看到一条信息提示:
30+
31+
.. image:: https://user-images.githubusercontent.com/24419842/216115906-9bb4fe55-293b-4c6b-8d22-0aa3520581ab.png
32+
:alt: 在 NVS 表格编辑器中的保存确认
33+
34+
5. 生成分区二进制文件。可选择 ``Encrypt`` 以加密该二进制文件。如需使用自定义密钥,可禁用 ``Generate Key`` 选项。文件生成后,对话框顶部会显示生成结果的信息提示。如果提示内容过长无法完全显示,可将鼠标悬停其上以查看全文:
35+
36+
.. image:: https://user-images.githubusercontent.com/24419842/216117261-9bee798a-3a9e-4be5-9466-fc9d3847834b.png
37+
:alt: 在 NVS 表格编辑器中的二进制文件生成结果
38+
39+
.. note::
40+
41+
如果出现错误,将会高亮显示。将鼠标悬停在错误图标上可以查看错误详情,同时在对话框顶部也会显示错误信息。

0 commit comments

Comments
 (0)