diff --git a/docs/en/get-started/establish-serial-connection.rst b/docs/en/get-started/establish-serial-connection.rst index 4b961b885d..51d6ab56fe 100644 --- a/docs/en/get-started/establish-serial-connection.rst +++ b/docs/en/get-started/establish-serial-connection.rst @@ -183,12 +183,34 @@ For devices downloaded using a USB-to-UART bridge, you can run the following com idf.py -p PORT [-b BAUD] flash -You can change the flasher baud rate by replacing ``BAUD`` with the baud rate you need. The default baud rate is ``460800``. +Replace ``PORT`` with the device name for the serial port of your {IDF_TARGET_NAME} board. Please note that ``-b`` is an optional argument. If you do not specify the baud rate, the default baud rate is ``460800``. If you need to specify the baud rate, replace ``BAUD`` with the baud rate you need. + +To check the port name on Windows, please refer to `check-port-on-windows`_. For Linux and macOS users, please see `check-port-on-linux-and-macos`_. + +For example, if the port name is ``COM3`` on Windows and your desired baud rate is ``115200``, you can run the following command to flash the device: + +.. code-block:: bash + + idf.py -p COM3 -b 115200 flash + +For Linux users, if the port name is ``/dev/ttyUSB0`` and the desired baud rate is ``115200``, you can run the following command to flash the device: + +.. code-block:: bash + + idf.py -p /dev/ttyUSB0 -b 115200 flash + +For macOS users, if the port name is ``/dev/cu.usbserial-1401`` and the desired baud rate is ``115200``, you can run the following command to flash the device: + +.. code-block:: bash + + idf.py -p /dev/cu.usbserial-1401 -b 115200 flash .. note:: If the device does not support the auto download mode, you need to get into the download mode manually. To do so, press and hold the ``BOOT`` button and then press the ``RESET`` button once. After that release the ``BOOT`` button. +.. _check-port-on-windows: + Check Port on Windows --------------------- @@ -210,6 +232,8 @@ Figures below show serial port for ESP32 DevKitC and ESP32 WROVER KIT Two USB Serial Ports of ESP-WROVER-KIT in Windows Device Manager +.. _check-port-on-linux-and-macos: + Check Port on Linux and macOS ----------------------------- diff --git a/docs/zh_CN/get-started/establish-serial-connection.rst b/docs/zh_CN/get-started/establish-serial-connection.rst index bd6efd1049..0141ba239c 100644 --- a/docs/zh_CN/get-started/establish-serial-connection.rst +++ b/docs/zh_CN/get-started/establish-serial-connection.rst @@ -183,12 +183,34 @@ idf.py -p PORT [-b BAUD] flash -如需改变烧录器的波特率,请用需要的波特率代替 ``BAUD``。默认的波特率为 ``460800``。 +将 ``PORT`` 替换为 {IDF_TARGET_NAME} 开发板的串口名称。``-b`` 为可选参数,默认的波特率为 ``460800``。如需改变烧录器的波特率,请用需要的波特率代替 ``BAUD``。 + +要查看串口名称,Windows 用户请参考 `check-port-on-windows`_,Linux 与 macOS 用户请参考 `check-port-on-linux-and-macos`_。 + +例如,Windows 平台上串口名称为 ``COM3``,所需波特率为 ``115200``,可使用如下命令烧录开发板: + +.. code-block:: bash + + idf.py -p COM3 -b 115200 flash + +Linux 平台上串口名称为 ``/dev/ttyUSB0``,所需波特率为 ``115200``,可使用如下命令烧录开发板: + +.. code-block:: bash + + idf.py -p /dev/ttyUSB0 -b 115200 flash + +macOS 平台上串口名称为 ``/dev/cu.usbserial-1401``,所需波特率为 ``115200``,可使用如下命令烧录开发板: + +.. code-block:: bash + + idf.py -p /dev/cu.usbserial-1401 -b 115200 flash .. note:: 如果设备不支持自动下载模式,则需要手动进入下载模式。请按住 ``BOOT`` 按钮,同时按一下 ``RESET`` 按钮。之后,松开 ``BOOT`` 按钮。 +.. _check-port-on-windows: + 在 Windows 上查看端口 --------------------- @@ -210,6 +232,8 @@ Windows 设备管理器中 ESP-WROVER-KIT 的两个 USB 串行端口 +.. _check-port-on-linux-and-macos: + 在 Linux 和 macOS 上查看端口 ----------------------------- diff --git a/docs/zh_CN/index.rst b/docs/zh_CN/index.rst index b3c01558d6..c85d98e1bf 100644 --- a/docs/zh_CN/index.rst +++ b/docs/zh_CN/index.rst @@ -9,7 +9,7 @@ ESP-IDF 编程指南 快速预览中不包括 API 函数文档。如需生成完整的文档,请在 MR 中添加 docs_full 标签。 -这里是乐鑫 IoT 开发框架 (`esp-idf `_) 的文档中心。ESP-IDF 是 `ESP32、ESP32-S ESP32-C、ESP32-H 和 ESP32-P `_ 系列芯片的官方开发框架。 +这里是乐鑫 IoT 开发框架 (`esp-idf `_) 的文档中心。ESP-IDF 是 `ESP32、ESP32-S、ESP32-C、ESP32-H 和 ESP32-P `_ 系列芯片的官方开发框架。 .. only:: html