docs: add command example to get-started/establish-serial-connection

pull/13309/head
Linda 2024-02-20 15:45:09 +08:00
rodzic 4cb3a75436
commit ecddca6582
3 zmienionych plików z 51 dodań i 3 usunięć

Wyświetl plik

@ -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
-----------------------------

Wyświetl plik

@ -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 上查看端口
-----------------------------

Wyświetl plik

@ -9,7 +9,7 @@ ESP-IDF 编程指南
快速预览中不包括 API 函数文档。如需生成完整的文档,请在 MR 中添加 docs_full 标签。
这里是乐鑫 IoT 开发框架 (`esp-idf <https://github.com/espressif/esp-idf>`_) 的文档中心。ESP-IDF 是 `ESP32、ESP32-S ESP32-C、ESP32-H 和 ESP32-P <https://www.espressif.com/en/products/socs>`_ 系列芯片的官方开发框架。
这里是乐鑫 IoT 开发框架 (`esp-idf <https://github.com/espressif/esp-idf>`_) 的文档中心。ESP-IDF 是 `ESP32、ESP32-SESP32-C、ESP32-H 和 ESP32-P <https://www.espressif.com/en/products/socs>`_ 系列芯片的官方开发框架。
.. only:: html