Skip to content

Commit fc6a76d

Browse files
committed
docs: Provide CN translation for appleveltracing.rst
1 parent 4b1b87e commit fc6a76d

File tree

2 files changed

+61
-9
lines changed

2 files changed

+61
-9
lines changed
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
Application Level Tracing
22
=========================
33

4-
ESP-IDF provides a useful feature for program behavior analysis called `Application Level Tracing <https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/app_trace.html?>`_. The IDF-Eclipse plugin has a UI that allows you to start and stop tracing commands and process the received data. To familiarize yourself with this library, you can use the `app_trace_to_host <https://github.com/espressif/esp-idf/tree/release/v5.0/examples/system/app_trace_to_host>`_ project or the `app_trace_basic <https://github.com/espressif/esp-idf/tree/release/v5.1/examples/system/app_trace_basic>`_ project (if using esp-idf 5.1 and higher). These projects can be created from the plugin itself:
4+
:link_to_translation:`zh_CN:[中文]`
5+
6+
ESP-IDF provides a useful feature for program behavior analysis called `Application Level Tracing <https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/app_trace.html?>`_. The IDF-Eclipse plugin provides a UI that allows you to start and stop tracing commands and process the received data. To get familiar with using this library, you can use the `app_trace_to_host <https://github.com/espressif/esp-idf/tree/release/v5.0/examples/system/app_trace_to_host>`_ project or the `app_trace_basic <https://github.com/espressif/esp-idf/tree/release/v5.1/examples/system/app_trace_basic>`_ project (if you are using ESP-IDF 5.1 or higher). You can create these projects directly from the plugin.
57

68
.. image:: ../../../media/AppLvlTracing_1.png
79
:alt: Application Level Tracing project creation
@@ -11,17 +13,18 @@ Before using application-level tracing, create a debug configuration for the pro
1113
.. image:: ../../../media/AppLvlTracing_3.png
1214
:alt: Debug configuration setup
1315

14-
After creating the debug configuration, right-click on the project in the Project Explorer and select *ESP-IDF > Application Level Tracing*:
16+
After creating the debug configuration, right-click on the project in the Project Explorer and select ``ESP-IDF: Application Level Tracing``.
1517

1618
.. image:: ../../../media/AppLvlTracing_2.png
1719
:alt: Application Level Tracing option in the context menu
1820

19-
It may take a moment to open the application level tracing dialog, as the OpenOCD server starts first. At the top of the dialog, you will find auto-configured fields that you can adjust for the trace start command.
21+
It may take a moment to open the application level tracing dialog, as the OpenOCD server starts first. At the top of the dialog, you will find auto-configured fields that you can adjust if needed for the trace start command.
2022

2123
**Start Command:**
2224

2325
- Syntax: ``start <outfile> [poll_period [trace_size [stop_tmo [wait4halt [skip_size]]]]``
2426
- Arguments:
27+
2528
- ``outfile``: Path to the file where data from both CPUs will be saved, with format ``file://path/to/file``.
2629
- ``poll_period``: Data polling period (in ms). If greater than 0, the command runs in non-blocking mode. Default: 1 ms.
2730
- ``trace_size``: Maximum data size to collect (in bytes). Tracing stops after the specified amount of data is received. Default: -1 (disabled).
@@ -34,14 +37,14 @@ Additional information can be found `here <https://docs.espressif.com/projects/e
3437
.. image:: ../../../media/AppLvlTracing_4.png
3538
:alt: Application Level Tracing dialog
3639

37-
The next two fields, *Trace Processing Script* and *Start Parsing Command*, are used to parse the output file.
40+
The next two fields, ``Trace Processing Script`` and ``Start Parsing Command``, are used to parse the output file.
3841

39-
- **Trace Processing Script**: Path to the parsing script, which by default is ``logtrace_proc.py`` from esp-idf.
40-
- **Start Parsing Command**: Allows you to check and edit the parsing command if necessary. By default, it is configured as: ``$IDF_PATH/tools/esp_app_trace/logtrace_proc.py/path/to/trace/file/path/to/program/elf/file``.
42+
- ``Trace Processing Script``: Path to the parsing script, which by default is ``logtrace_proc.py`` from ESP-IDF.
43+
- ``Start Parsing Command``: Allows you to check and edit the parsing command if necessary. By default, it is configured as: ``$IDF_PATH/tools/esp_app_trace/logtrace_proc.py/path/to/trace/file/path/to/program/elf/file``.
4144

42-
The *Start parse* button is disabled until a dump file is generated. To generate it, click the *Start* button at the bottom of the dialog box. This button changes to *Stop* once tracing starts, allowing you to stop it.
45+
The ``Start parse`` button is disabled until a dump file is generated. To generate the dump file, click the ``Start`` button at the bottom of the dialog box. This button changes to ``Stop`` once tracing starts, allowing you to stop tracing.
4346

44-
When the output file is available, click *Start parse* to view the parsed script output in the Eclipse console:
47+
When the output file is available, click ``Start parse`` to view the parsed script output in the Eclipse console.
4548

4649
.. image:: ../../../media/AppLvlTracing_5.png
4750
:alt: Parsed script output in Eclipse console
Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,50 @@
1-
.. include:: ../../en/additionalfeatures/appleveltracing.rst
1+
应用级跟踪
2+
==========
3+
4+
:link_to_translation:`en:[English]`
5+
6+
ESP-IDF 提供了用于程序行为分析的实用功能,称为 `应用级跟踪 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-guides/app_trace.html>`_。IDF-Eclipse 插件提供了 UI 界面,可用于启动和停止跟踪命令并处理接收的数据。为了熟悉该库,你可以参考 `app_trace_to_host <https://github.com/espressif/esp-idf/tree/release/v5.0/examples/system/app_trace_to_host>`_ 示例项目,或者 `app_trace_basic <https://github.com/espressif/esp-idf/tree/release/v5.1/examples/system/app_trace_basic>`_ 示例项目(要求使用 ESP-IDF 5.1 及以上)。这些示例项目可以直接通过插件创建。
7+
8+
.. image:: ../../../media/AppLvlTracing_1.png
9+
:alt: 应用级跟踪项目创建
10+
11+
在使用应用级跟踪之前,需要为项目创建调试配置,并选择所用的开发板,以便成功启动 OpenOCD 服务器。
12+
13+
.. image:: ../../../media/AppLvlTracing_3.png
14+
:alt: 调试配置设置
15+
16+
创建好调试配置后,在项目管理器中右键单击项目并选择 ``ESP-IDF: Application Level Tracing``。
17+
18+
.. image:: ../../../media/AppLvlTracing_2.png
19+
:alt: 上下文菜单中的应用级跟踪选项
20+
21+
打开应用级跟踪对话框可能需要一些时间,因为需要先启动 OpenOCD 服务器。对话框顶部有一些预配置的字段,这些字段用于启动跟踪命令,并可根据需要进行调整。
22+
23+
**启动命令:**
24+
25+
- 语法:``start <outfile> [poll_period [trace_size [stop_tmo [wait4halt [skip_size]]]]``
26+
- 参数:
27+
28+
- ``outfile``:保存来自两个 CPU 的数据的文件路径,格式为 ``file://path/to/file``。
29+
- ``poll_period``:数据轮询周期(单位:毫秒)。如果大于 0,则以非阻塞模式运行。默认值:1。
30+
- ``trace_size``:可收集的最大数据量(单位:字节)。在接收到指定的数据量后停止跟踪。默认值:-1(不设限)。
31+
- ``stop_tmo``:空闲超时时间(单位:秒)。在指定时间段内无数据则停止跟踪。默认值:-1(禁用)。
32+
- ``wait4halt``:为 0 时立即开始跟踪,否则等待目标暂停后再开始。默认值:0。
33+
- ``skip_size``:开始时要跳过的字节数。默认值:0。
34+
35+
更多信息请参阅 `此处 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-guides/app_trace.html>`_。
36+
37+
.. image:: ../../../media/AppLvlTracing_4.png
38+
:alt: 应用级跟踪对话框
39+
40+
接下来的两个字段 ``Trace Processing Script`` 和 ``Start Parsing Command`` 用于解析输出文件。
41+
42+
- ``Trace Processing Script``:解析脚本的路径,默认使用 ESP-IDF 提供的 ``logtrace_proc.py``。
43+
- ``Start Parsing Command``:用于在需要时检查并编辑解析命令。默认配置为:``$IDF_PATH/tools/esp_app_trace/logtrace_proc.py/path/to/trace/file/path/to/program/elf/file``。
44+
45+
在生成转储文件之前,``Start parse`` 按钮处于禁用状态。要生成该文件,请单击对话框底部的 ``Start`` 按钮。开始跟踪后,该按钮会变为 ``Stop``,你可以用点击该按钮停止跟踪。
46+
47+
输出文件生成后,可单击 ``Start parse``,在 Eclipse 控制台中查看解析脚本的输出。
48+
49+
.. image:: ../../../media/AppLvlTracing_5.png
50+
:alt: Eclipse 控制台中的解析脚本输出

0 commit comments

Comments
 (0)