diff --git a/docs/en/api-guides/tools/idf-py.rst b/docs/en/api-guides/tools/idf-py.rst index 4770ba6309..a6b58c5ed1 100644 --- a/docs/en/api-guides/tools/idf-py.rst +++ b/docs/en/api-guides/tools/idf-py.rst @@ -203,16 +203,16 @@ Clean the Python Byte Code: ``python-clean`` This command deletes generated python byte code from the ESP-IDF directory. The byte code may cause issues when switching between ESP-IDF and Python versions. It is advised to run this target after switching versions of Python. -Generate a UF2 binary: ``uf2`` +Generate a UF2 Binary: ``uf2`` --------------------------------- .. code-block:: bash idf.py uf2 -This command will generate a UF2 (`USB Flashing Format `_) binary ``uf2.bin`` in the build directory. This file includes all the necessary binaries (bootloader, app, and partition table) for flashing the target. +This command generates a UF2 (`USB Flashing Format `_) binary ``uf2.bin`` in the build directory. This file includes all the necessary binaries (bootloader, app, and partition table) for flashing the target. -This UF2 file can be copied to a USB mass storage device exposed by another ESP running the `ESP USB Bridge `_ project. The bridge MCU will use it to flash the target MCU. This is as simple copying (or "drag-and-dropping") the file to the exposed disk accessed by a file explorer in your machine. +This UF2 file can be copied to a USB mass storage device exposed by another ESP running the `ESP USB Bridge `_ project. The bridge MCU will use it to flash the target MCU. This is as simple as copying (or "drag-and-dropping") the file to the exposed disk accessed by a file explorer in your machine. To generate a UF2 binary for the application only (not including the bootloader and partition table), use the ``uf2-app`` command. diff --git a/docs/zh_CN/api-guides/tools/idf-py.rst b/docs/zh_CN/api-guides/tools/idf-py.rst index 8828c04b1d..0ddde03a18 100644 --- a/docs/zh_CN/api-guides/tools/idf-py.rst +++ b/docs/zh_CN/api-guides/tools/idf-py.rst @@ -203,6 +203,23 @@ ESP-IDF 支持多个目标芯片,运行 ``idf.py --list-targets`` 查看当前 此命令将从 ESP-IDF 目录中删除生成的 Python 字节码。字节码在切换 ESP-IDF 和 Python 版本时可能会引起问题,建议在切换 Python 版本后运行此命令。 +生成 UF2 二进制文件:``uf2`` +--------------------------------- + +.. code-block:: bash + + idf.py uf2 + +此命令将在构建目录中生成一个 UF2(`USB 烧录格式 `_) 二进制文件 ``uf2.bin``,该文件包含所有烧录目标芯片所必需的二进制文件,即引导加载程序、应用程序和分区表。 + +在 ESP 芯片上运行 `ESP USB Bridge `_ 项目将创建一个 USB 大容量存储设备,用户可以将生成的 UF2 文件复制到该 USB 设备中,桥接 MCU 将使用该文件来烧录目标 MCU。这一操作十分简单,只需将文件复制(或“拖放”)到文件资源管理器访问的公开磁盘中即可。 + +如需仅为应用程序生成 UF2 二进制文件,即不包含加载引导程序和分区表,请使用 ``uf2-app`` 命令。 + +.. code-block:: bash + + idf.py uf2-app + 全局选项 ==============