Skip to content

Commit 89e9165

Browse files
authored
Merge pull request #1668 from espressif/docs/translate_app_tracing_and_esp_terminal_resubmit
docs: Provide CN translation for two additional features docs (resubmit)
2 parents ca4328d + 2603fbf commit 89e9165

File tree

5 files changed

+82
-45
lines changed

5 files changed

+82
-45
lines changed
Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,43 @@
11
Application Tracing
2-
=========================
2+
===================
33

4-
This feature allows to transfer arbitrary data between host and ESP32 via JTAG interface with small overhead on program execution.
4+
:link_to_translation:`zh_CN:[中文]`
55

6-
Developers can use this library to send application specific state of execution to the host and receive commands or other type of info in the opposite direction at runtime.
6+
This feature allows transferring arbitrary data between the host and ESP32 via the JTAG interface with small overhead on program execution.
77

8-
Let's open a ESP-IDF project. For this tutorial we will use the `system/app_trace_basic <https://github.com/espressif/esp-idf/tree/master/examples/system/app_trace_basic>`_ example.
8+
Developers can use this library to send application-specific state of execution to the host and receive commands or other types of information in the opposite direction at runtime.
99

10-
- Navigate to **View** > **Command Palette**.
10+
Let's open an ESP-IDF project. For this tutorial, we will use the `system/app_trace_to_host <https://github.com/espressif/esp-idf/tree/master/examples/system/app_trace_to_host>`_ example.
1111

12-
- Type **ESP-IDF: New Project**, select the command and choose ESP-IDF version to use.
12+
1. Navigate to ``View`` > ``Command Palette``.
1313

14-
If you don't see the option, please review the setup in :ref:`Install ESP-IDF and Tools <installation>`.
14+
2. Type ``ESP-IDF: New Project``, select the command, and choose the ESP-IDF version to use.
1515

16-
- A window will be open with settings to configure the project. Later you can choose from the ESP-IDF examples, go the **system** section and choose the ``app_trace_basic``. You will see a **Create Project Using Example app_trace_basic project** button in the top and a description of the project below. Click the button and the project will be opened in a new window.
16+
.. note::
1717

18-
.. image:: ../../../media/tutorials/app_trace/app_tracing.png
18+
If you don't see the option, please review the setup in :ref:`Install ESP-IDF and Tools <installation>`.
1919

20-
For this example, the project has been already configured for application tracing purposes. On other projects you need to enable ``CONFIG_APPTRACE_DEST_JTAG`` and ``CONFIG_APPTRACE_ENABLE`` with the **ESP-IDF: SDK Configuration Editor** command.
20+
3. A window will open with settings to configure the project. You can later choose from a list of ESP-IDF examples. Go to the ``system`` section and choose ``app_trace_to_host``. You will see a ``Create Project Using Example app_trace_to_host`` button at the top and a description of the project below. Click the button, and the project will open in a new window.
2121

22-
.. note::
23-
For the ``app_trace_basic`` example to work properly, you need to add the following settings to your project's ``.vscode/settings.json`` file:
22+
.. image:: ../../../media/tutorials/app_trace/app_tracing.png
2423

25-
.. code-block:: json
24+
For this example, the project is already configured for application tracing purposes. In other projects, you need to enable ``CONFIG_APPTRACE_DEST_TRAX`` and ``CONFIG_APPTRACE_ENABLE`` with the ``ESP-IDF: SDK Configuration Editor`` command.
2625

27-
{
28-
"trace.poll_period": 0,
29-
"trace.trace_size": 2048,
30-
"trace.stop_tmo": 3,
31-
"trace.wait4halt": 0,
32-
"trace.skip_size": 0
33-
}
26+
4. Configure, build, and flash your project as explained in the :ref:`Build the project <build the project>`.
3427

35-
These settings ensure the same tracing behavior as demonstrated in the example.
28+
5. First, click ``ESP-IDF Explorer`` in the `Visual Studio Code Activity bar <https://code.visualstudio.com/docs/getstarted/userinterface>`_. Second, in the ``IDF APP TRACER`` section, click ``Start App Trace``. This will execute the extension's OpenOCD server and send the corresponding tracing commands to generate a tracing log. Third, you can see the generated tracing log in the ``APP TRACE ARCHIVES`` named ``Trace Log #1``.
3629

37-
- Configure, build and flash your project as explained in the :ref:`Build the project <build the project>`.
30+
Each time you execute ``Start App Trace``, a new tracing is generated and shown in the archives list. You can also start tracing by running the ``ESP-IDF: App Trace`` command.
3831

39-
- Click the ``ESP-IDF Explorer`` in the `Visual Studio Code Activity bar <https://code.visualstudio.com/docs/getstarted/userinterface>`_.
32+
.. note::
4033

41-
1. On the ``IDF APP TRACER`` section, click the ``Start App Trace``. This will execute the extension's OpenOCD server and send the corresponding tracing commands to generate a tracing log.
34+
* The OpenOCD server output is shown in menu ``View`` > ``Output`` > ``ESP-IDF``.
35+
* Ensure that OpenOCD configuration files are properly configured with the ``ESP-IDF: Select OpenOCD Board Configuration`` command.
4236

43-
2. You can see the generated tracing log in the ``APP TRACE ARCHIVES`` named with ``Trace Log #1``.
37+
.. image:: ../../../media/tutorials/app_trace/start_tracing.png
4438

45-
3. Each time you execute ``Start App Trace`` a new tracing will be generated and shown in the archives list. You can also start tracing by running the **ESP-IDF: App Trace** command.
39+
6. Click ``Trace Log #1`` to open a window with the trace report. Click the ``Show Report`` button to see the trace output.
4640

47-
.. note::
48-
* The OpenOCD server output is shown in menu **View** > **Output** > **ESP-IDF**.
49-
* Make sure that OpenOCD configuration files are properly configured with **ESP-IDF: Select OpenOCD Board Configuration** command.
41+
.. image:: ../../../media/tutorials/app_trace/trace_report.png
5042

51-
.. image:: ../../../media/tutorials/app_trace/start_tracing.png
52-
53-
- Click on ``Trace Log #1`` to open the trace file directly in the editor.
54-
55-
.. image:: ../../../media/tutorials/app_trace/trace_report.png
56-
57-
For more information please take a look at the `Application Level Tracing library Documentation <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html>`_.
43+
For more information, please refer to `Application Level Tracing Library <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html>`_.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
ESP-IDF Terminal
2-
===============================
2+
================
33

4-
Navigate to **View** > **Command Palette**.
4+
:link_to_translation:`zh_CN:[中文]`
55

6-
- Type **ESP-IDF: Open ESP-IDF Terminal** and select the command.
7-
- This will launch a system terminal with ESP-IDF, ESP-IDF Tools and ESP-IDF Python Virtual Environment loaded as environment variables.
8-
- Just typing ``idf.py`` or ``python -m esptool`` should work to execute scripts from ESP-IDF and additional frameworks.
6+
1. Navigate to ``View`` > ``Command Palette``.
7+
2. Type ``ESP-IDF: Open ESP-IDF Terminal`` and select the command. This will launch a system terminal with ESP-IDF, ESP-IDF Tools, and ESP-IDF Python Virtual Environment loaded as environment variables.
8+
3. Type ``idf.py`` or ``python -m esptool`` to execute scripts from ESP-IDF and additional frameworks.
99

10-
.. image:: ../../../media/tutorials/features/idf-terminal.png
10+
.. image:: ../../../media/tutorials/features/idf-terminal.png

docs_espressif/zh_CN/additionalfeatures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
:maxdepth: 1
1010

1111
应用程序大小分析<additionalfeatures/application-size-analysis>
12-
应用跟踪<additionalfeatures/app-tracing>
12+
应用程序跟踪<additionalfeatures/app-tracing>
1313
CMakeLists.txt 编辑器<additionalfeatures/cmakelists-editor>
1414
代码覆盖率<additionalfeatures/coverage>
1515
通过 USB 升级设备固件<additionalfeatures/dfu>
Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
1-
.. include:: ../../en/additionalfeatures/app-tracing.rst
1+
应用程序跟踪
2+
============
3+
4+
:link_to_translation:`en:[English]`
5+
6+
应用程序跟踪功能可以通过 JTAG 接口在主机和 ESP32 之间传输任意数据,且程序的执行开销较小。
7+
8+
开发者可以使用该库在运行时将应用程序特定的执行状态发送至主机,并接收来自主机的命令或其他类型的信息。
9+
10+
打开一个 ESP-IDF 项目,本教程以 `system/app_trace_to_host <https://github.com/espressif/esp-idf/tree/master/examples/system/app_trace_to_host>`_ 示例为例。
11+
12+
1. 前往菜单栏 ``查看`` > ``命令面板``。
13+
14+
2. 输入 ``ESP-IDF:新建项目``,选择该命令,并选择要使用的 ESP-IDF 版本。
15+
16+
.. note::
17+
18+
如果未看到该选项,请检查当前的 ESP-IDF 设置,详见 :ref:`安装 ESP-IDF 和相关工具 <installation>`。
19+
20+
3. 系统将弹出用于配置项目的窗口。从 ESP-IDF 示例列表中选择示例,在 ``system`` 部分选择 ``app_trace_to_host``。页面顶部会出现 ``Create Project Using Example app_trace_to_host`` 按钮,页面下方会出现项目描述,点击按钮,项目会在新窗口中打开。
21+
22+
.. image:: ../../../media/tutorials/app_trace/app_tracing.png
23+
24+
在此示例中,项目已配置应用程序跟踪。在其他项目中,请使用 ``ESP-IDF:SDK 配置编辑器`` 命令启用 ``CONFIG_APPTRACE_DEST_TRAX`` 和 ``CONFIG_APPTRACE_ENABLE``。
25+
26+
4. 按照 :ref:`构建项目 <build the project>` 中的说明,配置、构建并烧录项目。
27+
28+
5. 首先,点击 `Visual Studio Code 活动栏 <https://code.visualstudio.com/docs/getstarted/userinterface>`_ 中的 ``ESP-IDF Explorer``。其次,在 ``IDF APP TRACER`` 中,点击 ``Start App Trace``。这将启动扩展的 OpenOCD 服务器并发送相应的跟踪命令以生成跟踪日志。最后,可以在 ``APP TRACE ARCHIVES`` 中查看生成的日志,名称为 ``Trace Log #1``。
29+
30+
每次执行 ``Start App Trace`` 都会生成一个新的跟踪,显示在归档列表中。也可以通过运行 ``ESP-IDF:应用程序跟踪`` 命令启动跟踪。
31+
32+
.. note::
33+
34+
* OpenOCD 服务器输出会显示在菜单栏 ``查看`` > ``输出`` > ``ESP-IDF`` 中。
35+
* 使用 ``ESP-IDF:选择 OpenOCD 开发板配置`` 命令,确保 OpenOCD 文件配置正确。
36+
37+
.. image:: ../../../media/tutorials/app_trace/start_tracing.png
38+
39+
6. 点击 ``Trace Log #1`` 打开包含跟踪报告的窗口。点击 ``Show Report`` 按钮查看跟踪输出。
40+
41+
.. image:: ../../../media/tutorials/app_trace/trace_report.png
42+
43+
更多关于本功能的信息,请参阅 `应用层跟踪库 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/app_trace.html>`_。
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
.. include:: ../../en/additionalfeatures/esp-terminal.rst
1+
ESP-IDF 终端
2+
================
3+
4+
:link_to_translation:`en:[English]`
5+
6+
1. 前往菜单栏 ``查看`` > ``命令面板``。
7+
2. 输入 ``ESP-IDF:打开 ESP-IDF 终端`` 并选中该命令。这将启动系统终端,并将 ESP-IDF、ESP-IDF 工具以及 ESP-IDF Python 虚拟环境作为环境变量加载。
8+
3. 输入 ``idf.py`` 或 ``python -m esptool`` 即可运行 ESP-IDF 及其他附加框架的脚本。
9+
10+
.. image:: ../../../media/tutorials/features/idf-terminal.png

0 commit comments

Comments
 (0)