Skip to content

Commit 89e904a

Browse files
committed
docs: Provide CN translation for wokwisimulator.rst and dfu.rst
1 parent 3ae9b40 commit 89e904a

File tree

4 files changed

+91
-26
lines changed

4 files changed

+91
-26
lines changed

docs/en/additionalfeatures/dfu.rst

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,44 @@
33
Device Firmware Upgrade (DFU) through USB
44
==========================================
55

6+
:link_to_translation:`zh_CN:[中文]`
7+
68
Device Firmware Upgrade (DFU) is a mechanism for upgrading the firmware of devices through Universal Serial Bus (USB). There are a few requirements that need to be met:
79

8-
- DFU is supported by ESP32-S2 and ESP32-S3 chips.
9-
- You will need to do some electrical connection work. Here is a `guide <https://blog.espressif.com/dfu-using-the-native-usb-on-esp32-s2-for-flashing-the-firmware-b2c4af3335f1>`_ for the ESP32-S2 board. The necessary connections for the USB peripheral are shown in the following table.
10-
11-
+------+---------------+
12-
| GPIO | USB |
13-
+======+===============+
14-
| 20 | D+ (green) |
15-
+------+---------------+
16-
| 19 | D- (white) |
17-
+------+---------------+
18-
| GND | GND (black) |
19-
+------+---------------+
20-
| +5V | +5V (red) |
21-
+------+---------------+
10+
- DFU is supported by ESP32-S2 and ESP32-S3 chips.
11+
- You will need to do some electrical connection work. You can follow this `guide <https://blog.espressif.com/dfu-using-the-native-usb-on-esp32-s2-for-flashing-the-firmware-b2c4af3335f1>`__ for the ESP32-S2 board, and this `guide <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/dfu.html>`__ for the ESP32-S3 board. The necessary connections for the USB peripheral are shown in the following table.
12+
13+
.. list-table::
14+
:header-rows: 1
15+
16+
* - GPIO
17+
- USB
18+
* - 20
19+
- D+ (green)
20+
* - 19
21+
- D- (white)
22+
* - GND
23+
- GND (black)
24+
* - +5V
25+
- +5V (red)
2226

2327
After meeting the above requirements:
2428

2529
1. The chip needs to be in bootloader mode for detection as a DFU device and flashing. This can be achieved by pulling GPIO0 down (e.g., pressing the BOOT button), pulsing RESET down for a moment, and releasing GPIO0.
2630
2. Install USB drivers (Windows only). The drivers can be installed by the `Zadig tool <https://zadig.akeo.ie/>`_.
31+
2732
- Ensure that the device is in download mode before running the tool and that it detects the device before installing the drivers.
2833
- The Zadig tool might detect several USB interfaces of the target. Install the WinUSB driver only for the interface without a driver installed (likely Interface 2), and avoid re-installing drivers for other interfaces.
2934
- Manual driver installation via Device Manager in Windows is not recommended, as it might cause flashing issues.
3035

3136
After meeting the above requirements, you can proceed to build and flash via DFU. To use DFU:
3237

3338
1. Edit the active launch configuration.
34-
2. In the main tab, select the *Flash over DFU* option.
39+
2. In the main tab, select the ``Flash over DFU`` option.
3540
3. Select a suitable IDF target for DFU.
3641
4. When using the build command, an extra file (``dfu.bin``) will be created, which can be used later for flashing.
3742

3843
.. image:: https://user-images.githubusercontent.com/24419842/226182180-286099d3-9c1c-4394-abb0-212d43054529.png
3944
:alt: DFU actions
4045

41-
Additional information, including common errors and known issues, is available in `this <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/dfu.html#usb-drivers-windows-only>`_.
42-
46+
Additional information, including common errors and known issues, is available `here <https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-guides/dfu.html#usb-drivers-windows-only>`_.
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
Wokwi Simulator
22
===============
33

4+
:link_to_translation:`zh_CN:[中文]`
5+
46
To use the Wokwi Simulator within the IDE, follow these steps:
57

6-
1. Install `wokwi-server` as explained in the [wokwi-server installation guide](https://github.com/MabezDev/wokwi-server/).
7-
2. In the Eclipse CDT build environment variables, configure `WOKWI_SERVER_PATH` with the path to the `wokwi-server` executable (*Preferences* > *C/C++* > *Build* > *Environment*).
8-
3. Create a new *Run launch configuration* with the *Wokwi Simulator*.
9-
4. Select a project and add the Wokwi project ID. The ID of a Wokwi project can be found in its URL. For example, the project ID of the Wokwi project [ESP32 Rust Blinky](https://wokwi.com/projects/345932416223806035) is `345932416223806035`.
10-
5. Click *Finish* to save the configuration changes.
11-
6. From the IDE Toolbar, click the *Launch* button to start the Wokwi simulator.
8+
1. Install ``wokwi-server`` as explained in the `wokwi-server installation guide <https://github.com/MabezDev/wokwi-server/>`_.
9+
2. Go to ``Preferences`` > ``C/C++`` > ``Build`` > ``Environment``. In the Eclipse CDT build environment variables, configure ``WOKWI_SERVER_PATH`` with the path to the ``wokwi-server`` executable.
10+
3. Create a new ``Run launch configuration`` with the ``Wokwi Simulator``.
11+
4. Select a project and add the Wokwi project ID. The ID of a Wokwi project can be found in its URL. For example, the project ID of the Wokwi project `ESP32 Rust Blinky <https://wokwi.com/projects/345932416223806035>`_ is ``345932416223806035``.
12+
5. Click ``Finish`` to save the configuration changes.
13+
6. From the IDE Toolbar, click the ``Launch`` button to start the Wokwi simulator.
1214
7. The Wokwi Simulator will open in an external browser, with serial monitor output displayed in the Eclipse CDT build console.
13-
8. To terminate the Wokwi Simulator, click the *Stop* button in the toolbar.
15+
8. To terminate the Wokwi Simulator, click the ``Stop`` button in the toolbar.
Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
.. include:: ../../en/additionalfeatures/dfu.rst
1+
.. _dfuflashing:
2+
3+
通过 USB 进行设备固件升级 (DFU)
4+
==========================================
5+
6+
:link_to_translation:`en:[English]`
7+
8+
设备固件升级 (Device Firmware Upgrade, DFU) 是一种通过通用串行总线 (Universal Serial Bus, USB) 为设备升级固件的机制。需要满足以下要求:
9+
10+
- ESP32-S2 和 ESP32-S3 芯片支持 DFU。
11+
- 需要进行一些电气连接工作,可参考这篇面向 ESP32-S2 开发板的 `指南 <https://blog.espressif.com/dfu-using-the-native-usb-on-esp32-s2-for-flashing-the-firmware-b2c4af3335f1>`__,以及这篇面向 ESP32-S3 开发板的 `指南 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s2/api-guides/dfu.html>`__。USB 外设所需的连接可参见下表。
12+
13+
.. list-table::
14+
:header-rows: 1
15+
16+
* - GPIO
17+
- USB
18+
* - 20
19+
- D+(绿色)
20+
* - 19
21+
- D-(白色)
22+
* - GND
23+
- GND(黑色)
24+
* - +5 V
25+
- +5 V(红色)
26+
27+
满足上述要求后,继续以下步骤:
28+
29+
1. 芯片需要进入引导加载程序模式,才能被检测为 DFU 设备并进行烧录。可以通过将 GPIO0 拉低(例如,按下 BOOT 按钮),将 RESET 短暂拉低,然后释放 GPIO0 来实现。
30+
2. 安装 USB 驱动(仅限 Windows 系统)。可以使用 `Zadig 工具 <https://zadig.akeo.ie/>`_ 安装驱动。
31+
32+
- 在运行该工具前,确保设备处于下载模式,并且在安装驱动前,工具已检测到该设备。
33+
- Zadig 工具可能会检测到目标设备的多个 USB 接口。你只需要为还没有驱动程序的接口(通常是 Interface 2)安装 WinUSB 驱动,不要对其他已经安装了驱动的接口重复安装。
34+
- 不建议通过 Windows 的设备管理器手动安装驱动,因为这可能导致烧录问题。
35+
36+
满足上述要求后,即可通过 DFU 进行构建和烧录。参照下列步骤使用 DFU:
37+
38+
1. 编辑当前启用的启动配置。
39+
2. 在主选项卡中,选择 ``Flash over DFU`` 选项。
40+
3. 选择适用于 DFU 的 IDF 目标。
41+
4. 使用构建命令时会生成一个额外的文件 (``dfu.bin``),可用于后续烧录。
42+
43+
.. image:: https://user-images.githubusercontent.com/24419842/226182180-286099d3-9c1c-4394-abb0-212d43054529.png
44+
:alt: DFU 操作
45+
46+
包括常见错误和已知问题在内的更多信息,可参阅 `此处 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-guides/dfu.html#usb-windows>`_。
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
.. include:: ../../en/additionalfeatures/wokwisimulator.rst
1+
Wokwi 模拟器
2+
===============
3+
4+
:link_to_translation:`en:[English]`
5+
6+
要在 IDE 中使用 Wokwi 模拟器,请按以下步骤操作:
7+
8+
1. 安装 ``wokwi-server``,具体步骤见 `wokwi-server 安装指南 <https://github.com/MabezDev/wokwi-server/>`_。
9+
2. 前往 ``Preferences`` > ``C/C++`` > ``Build`` > ``Environment``。在 Eclipse CDT 构建环境变量中,将 ``WOKWI_SERVER_PATH`` 配置为 ``wokwi-server`` 可执行文件的路径。
10+
3. 使用 ``Wokwi Simulator`` 创建新的 ``Run launch configuration``。
11+
4. 选择一个项目,添加 Wokwi 项目的 ID。Wokwi 项目的 ID 可以在其 URL 中找到。例如,Wokwi 项目 `ESP32 Rust Blinky <https://wokwi.com/projects/345932416223806035>`_ 的项目 ID 为 ``345932416223806035``。
12+
5. 点击 ``Finish`` 以保存配置更改。
13+
6. 在 IDE 工具栏中,点击 ``Launch`` 按钮以启动 Wokwi 模拟器。
14+
7. Wokwi 模拟器将会在外部浏览器中打开,串口监视器输出将显示在 Eclipse CDT 构建控制台中。
15+
8. 如需结束 Wokwi 模拟器,请在工具栏中点击 ``Stop`` 按钮。

0 commit comments

Comments
 (0)