Skip to content

Commit ebae8ed

Browse files
authored
Merge pull request #1669 from espressif/docs/translate_qemu_resubmit
docs: Provide CN translation for qemu.rst (resubmit)
2 parents a607d87 + 5e57306 commit ebae8ed

File tree

5 files changed

+59
-21
lines changed

5 files changed

+59
-21
lines changed

docs_espressif/en/additionalfeatures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Additional IDE Features
2424
NVS Partition Table Editor<additionalfeatures/nvs-partition-editor>
2525
Partition Table Editor<additionalfeatures/partition-table-editor>
2626
Project Configuration Editor<additionalfeatures/project-configuration>
27-
QEMU<additionalfeatures/qemu>
27+
QEMU Integration<additionalfeatures/qemu>
2828
ESP RainMaker<additionalfeatures/rainmaker>
2929
Unit Testing<additionalfeatures/unit-testing>
3030
Working with Multiple Projects<additionalfeatures/multiple-projects>
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
.. _qemu:
22

3-
ESP-IDF QEMU Integration with Visual Studio Code
4-
===================================================
3+
QEMU Integration
4+
================
55

6-
When you create a project using this extension commands, there is Dockerfile which can be used with the `Microsoft Remote Containers Extension <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>`_. You can open any project inside a container with the **Remote Containers: Open Folder in Container..** command.
6+
When you create a project using this extension's commands, a Dockerfile is included for use with the `Dev Containers <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>`_. You can open any project inside a container with the ``Dev Containers: Open Folder in Container`` command.
77

8-
ESP-IDF setup can include a fork of `Espressif QEMU fork <https://github.com/espressif/qemu>`_ for Espressif devices, which can be used for emulated development. You can make sure is installed it by running ``python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv32`` in the **ESP-IDF: Open ESP-IDF Terminal** terminal.
8+
The ESP-IDF setup can include a fork of the `Espressif QEMU <https://github.com/espressif/qemu>`_ for Espressif devices, which is used for emulated development. Ensure it is installed by running ``python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv32`` in the ``ESP-IDF: Open ESP-IDF Terminal`` terminal.
99

1010
.. note::
11-
* The **ESP-IDF: Add Docker Container Configuration** command can be used to add these files to the current project directory.
11+
12+
The ``ESP-IDF: Add Docker Container Configuration`` command can be used to add these files to the current project directory.
1213

1314
Development steps:
1415

15-
1. Prepare a project folder in a container based on the dockerfile in the templates ``.devcontainer`` directory in this repository. For this you can:
16-
- Create a project using **ESP-IDF: New Project** command which will include the ``.devcontainer`` directory.
17-
- Use the **ESP-IDF: Add Docker Container Configuration** command to add the ``.devcontainer`` files to the currently opened project directory.
18-
2. Use the **Remote Containers: Open Folder in Container..** command to open the folder within the container.
19-
3. The **Remote Containers** will build the container from the Dockerfile (if it has not been created before) and install this extension on the container.
20-
4. The extension should be self configured, otherwise run the setup wizard.
21-
5. Write your code and build the project with the **ESP-IDF: Build your Project** command.
22-
6. Use the **ESP-IDF: Launch QEMU Server** command or the **[QEMU Server]** link in the activity bar to launch QEMU with the binaries from the build directory.
23-
7. You can use the **ESP-IDF: Monitor QEMU Device** command to launch a terminal running IDF Monitor on QEMU.
24-
8. If you want to launch a QEMU debug session, use the **ESP-IDF: Launch QEMU Debug Session** commmand, which will stop any existing QEMU server and launch a new QEMU server for debugging.
16+
1. Prepare a project folder in a container based on the Dockerfile in the template's ``.devcontainer`` directory in this repository. For this you can:
17+
18+
- Create a project using the ``ESP-IDF: New Project`` command, which includes the ``.devcontainer`` directory.
19+
- Use the ``ESP-IDF: Add Docker Container Configuration`` command to add the ``.devcontainer`` files to the currently opened project directory.
2520

26-
You can use the ``idf.qemuDebugMonitor`` configuration setting to enable the monitor to start after QEMU debug session is launched. If you want to pass additional arguments ``idf.qemuExtraArgs`` configuration setting can be used.
21+
2. Use the ``Dev Containers: Open Folder in Container`` command to open the folder within the container.
22+
3. The **Dev Containers** will build the container from the Dockerfile (if it has not been created before) and install this extension on the container.
23+
4. The extension should be self-configured; otherwise, run the setup wizard.
24+
5. Write your code and build the project with the ``ESP-IDF: Build your Project`` command.
25+
6. Use the ``ESP-IDF: Launch QEMU Server`` command or the **[QEMU Server]** link in the activity bar to launch QEMU with the binaries from the build directory.
26+
7. Use the ``ESP-IDF: Monitor QEMU Device`` command to launch a terminal running IDF Monitor on QEMU.
27+
8. To launch a QEMU debug session, use the ``ESP-IDF: Launch QEMU Debug Session`` commmand, which will stop any existing QEMU server and launch a new QEMU server for debugging.
2728

28-
An example of ``"idf.qemuExtraArgs": ["--qemu-extra-args"]`` can be used to pass additional arguments to QEMU directly while ``--flash-file`` or ``--efuse-file`` are idf.py specific arguments as described in **ESP-IDF QEMU Emulator** documentation below.
29+
Set the ``idf.qemuDebugMonitor`` configuration option to start the monitor after the QEMU debug session is launched. To pass additional arguments, set the ``idf.qemuExtraArgs`` configuration option.
2930

30-
More information about how to use in `ESP-IDF QEMU Emulator <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/qemu.html>`_.
31+
An example of ``"idf.qemuExtraArgs": ["--qemu-extra-args"]`` can be used to pass additional arguments to QEMU directly, while ``--flash-file`` or ``--efuse-file`` are ``idf.py`` specific arguments as described in the `ESP-IDF QEMU Emulator <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/qemu.html>`_ documentation.
3132

3233
.. note::
33-
The extension assumes that ``qemu-system-xtensa`` or ``qemu-system-riscv32`` is available in the environment variable PATH to run **ESP-IDF: Monitor QEMU Device** and **ESP-IDF: Launch QEMU Debug Session**.
34+
35+
The extension assumes that ``qemu-system-xtensa`` or ``qemu-system-riscv32`` is available in the environment variable PATH to run ``ESP-IDF: Monitor QEMU Device`` and ``ESP-IDF: Launch QEMU Debug Session``.

docs_espressif/zh_CN/additionalfeatures.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
通过 USB 升级设备固件<additionalfeatures/dfu>
1616
Docker 容器<additionalfeatures/docker-container>
1717
ESP-IDF 终端<additionalfeatures/esp-terminal>
18+
ESP-IDF 配置文件<additionalfeatures/esp-idf-profiles>
1819
eFuse 资源管理器<additionalfeatures/efuse>
1920
flash 加密<additionalfeatures/flash-encryption>
2021
堆跟踪<additionalfeatures/heap-tracing>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../../en/additionalfeatures/esp-idf-profiles.rst
Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
.. include:: ../../en/additionalfeatures/qemu.rst
1+
.. _qemu:
2+
3+
QEMU 模拟器
4+
===========
5+
6+
使用该扩展的命令创建项目时,会包含 Dockerfile,用于配合 `Dev Containers <https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers>`_ 使用。使用 ``开发容器:在容器中打开文件夹`` 命令可以在容器中打开任意项目。
7+
8+
安装 ESP-IDF 时会包含一个 `乐鑫 QEMU 分支 <https://github.com/espressif/qemu>`_,此分支可基于乐鑫设备进行仿真开发。运行 ``ESP-IDF:打开 ESP-IDF 终端`` 命令,在终端中执行 ``python $IDF_PATH/tools/idf_tools.py install qemu-xtensa qemu-riscv32``,确保安装该分支。
9+
10+
.. note::
11+
12+
可以使用 ``ESP-IDF:添加 Docker 容器配置`` 命令,将这些文件添加到当前项目目录中。
13+
14+
开发步骤:
15+
16+
1. 基于本仓库模板的 ``.devcontainer`` 目录中的 Dockerfile,在容器中准备一个项目文件夹。你可以通过以下方式实现:
17+
18+
- 使用 ``ESP-IDF:新建项目`` 命令创建项目,该项目会包含 ``.devcontainer`` 目录。
19+
- 使用 ``ESP-IDF:添加 Docker 容器配置`` 命令,将 ``.devcontainer`` 文件添加至当前已打开的项目目录。
20+
21+
2. 使用 ``开发容器:在容器中打开文件夹`` 命令,在容器中打开项目文件夹。
22+
3. **Dev Containers** 会根据 Dockerfile 构建容器(如果之前未构建过),并在容器中安装此扩展。
23+
4. 扩展应自动完成配置,如未完成,请运行设置向导。
24+
5. 编写代码,并使用 ``ESP-IDF:构建项目`` 命令构建项目。
25+
6. 使用 ``ESP-IDF:启动 QEMU 服务器`` 命令或活动栏中的 **[QEMU Server]** 链接,启动 QEMU,并加载构建目录中的二进制文件。
26+
7. 使用 ``ESP-IDF:监视 QEMU 设备`` 命令,启动一个运行 IDF 监视器的终端,以监视 QEMU。
27+
8. 要启动 QEMU 调试会话,请使用 ``ESP-IDF:启动 QEMU 调试会话`` 命令,该命令会停止当前的 QEMU 服务器并启动一个新的 QEMU 服务器以进行调试。
28+
29+
设置 ``idf.qemuDebugMonitor`` 配置项,在启动 QEMU 调试会话后启动监视器。要传递额外参数,请设置 ``idf.qemuExtraArgs`` 配置项。
30+
31+
例如,可以通过设置 ``"idf.qemuExtraArgs": ["--qemu-extra-args"]`` 向 QEMU 直接传递额外参数,而 ``--flash-file`` 或 ``--efuse-file`` 则属于 ``idf.py`` 特有的参数,详情请参阅 `ESP-IDF QEMU 模拟器 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/tools/qemu.html>`_ 文档。
32+
33+
.. note::
34+
35+
扩展在运行 ``ESP-IDF:监视 QEMU 设备`` 和 ``ESP-IDF:启动 QEMU 调试会话`` 命令时,默认 ``qemu-system-xtensa`` 或 ``qemu-system-riscv32`` 已在环境变量 PATH 中可用。

0 commit comments

Comments
 (0)