mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
docs(jtag): update esp32h21 jtag debugging guide
This commit is contained in:
@@ -27,13 +27,6 @@ api-guides/ble/ble-qualification.rst
|
||||
api-guides/ble/blufi.rst
|
||||
api-guides/ble/ble-feature-support-status.rst
|
||||
api-guides/file-system-considerations.rst
|
||||
api-guides/jtag-debugging/index.rst
|
||||
api-guides/jtag-debugging/debugging-examples.rst
|
||||
api-guides/jtag-debugging/configure-ft2232h-jtag.rst
|
||||
api-guides/jtag-debugging/configure-other-jtag.rst
|
||||
api-guides/jtag-debugging/using-debugger.rst
|
||||
api-guides/jtag-debugging/tips-and-quirks.rst
|
||||
api-guides/jtag-debugging/configure-builtin-jtag.rst
|
||||
api-guides/RF_calibration.rst
|
||||
api-guides/usb-otg-console.rst
|
||||
api-guides/current-consumption-measurement-modules.rst
|
||||
|
||||
@@ -3,7 +3,7 @@ Configure Other JTAG Interfaces
|
||||
|
||||
:link_to_translation:`zh_CN:[中文]`
|
||||
|
||||
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE", esp32h2="JTAG_SEL_ENABLE", esp32p4="JTAG_SEL_ENABLE", esp32c5="JTAG_SEL_ENABLE", esp32c61="JTAG_SEL_ENABLE", esp32h4="JTAG_SEL_ENABLE"}
|
||||
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE", esp32h2="JTAG_SEL_ENABLE", esp32p4="JTAG_SEL_ENABLE", esp32c5="JTAG_SEL_ENABLE", esp32c61="JTAG_SEL_ENABLE", esp32h4="JTAG_SEL_ENABLE", esp32h21="JTAG_SEL_ENABLE"}
|
||||
|
||||
For guidance about which JTAG interface to select when using OpenOCD with {IDF_TARGET_NAME}, refer to the section :ref:`jtag-debugging-selecting-jtag-adapter`. Then follow the configuration steps below to get it working.
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
::
|
||||
|
||||
openocd -f board/esp32h2-builtin.cfg
|
||||
openocd -f board/esp32h21-builtin.cfg
|
||||
|
||||
.. |run-openocd-device-name| replace:: ESP32-H2 through built-in USB connection
|
||||
.. |run-openocd-device-name| replace:: ESP32-H21 through built-in USB connection
|
||||
|
||||
---
|
||||
|
||||
@@ -21,28 +21,27 @@
|
||||
|
||||
::
|
||||
|
||||
user-name@computer-name:~/esp/esp-idf$ openocd -f board/esp32h2-builtin.cfg
|
||||
Open On-Chip Debugger v0.12.0-esp32-20221026-175-g0f5217b3-dirty (2023-02-02-11:32)
|
||||
user-name@computer-name:~/esp/esp-idf$ openocd -f board/esp32h21-builtin.cfg
|
||||
Open On-Chip Debugger v0.12.0-esp32-20251215-41-g82a490d3-dirty (2026-01-22-17:06)
|
||||
Licensed under GNU GPL v2
|
||||
For bug reports, read
|
||||
http://openocd.org/doc/doxygen/bugs.html
|
||||
Info : only one transport option; autoselecting 'jtag'
|
||||
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
|
||||
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
|
||||
Warn : Transport "jtag" was already selected
|
||||
Info : Listening on port 6666 for tcl connections
|
||||
Info : Listening on port 4444 for telnet connections
|
||||
Info : esp_usb_jtag: serial (60:55:F9:F7:2C:3F)
|
||||
Info : esp_usb_jtag: serial (00:00:00:00:00:00)
|
||||
Info : esp_usb_jtag: Device found. Base speed 24000KHz, div range 1 to 255
|
||||
Info : clock speed 24000 kHz
|
||||
Info : JTAG tap: esp32h2.cpu tap/device found: 0x00010c25 (mfg: 0x612 (Espressif Systems), part: 0x0010, ver: 0x0)
|
||||
Info : datacount=2 progbufsize=16
|
||||
Info : Examined RISC-V core; found 1 harts
|
||||
Info : hart 0: XLEN=32, misa=0x40903105
|
||||
Info : starting gdb server for esp32h2 on 3333
|
||||
Info : JTAG tap: esp32h21.tap0 tap/device found: 0x00019c25 (mfg: 0x612 (Espressif Systems), part: 0x0019, ver: 0x0)
|
||||
Info : [esp32h21] datacount=2 progbufsize=16
|
||||
Info : [esp32h21] Examined RISC-V core; found 1 harts
|
||||
Info : [esp32h21] XLEN=32, misa=0x40103105
|
||||
Info : [esp32h21] Examination succeed
|
||||
Info : [esp32h21] starting gdb server on 3333
|
||||
Info : Listening on port 3333 for gdb connections
|
||||
|
||||
.. |run-openocd-cfg-file-err| replace:: ``Can't find board/esp32h2-builtin.cfg``
|
||||
.. |run-openocd-cfg-file-err| replace:: ``Can't find board/esp32h21-builtin.cfg``
|
||||
|
||||
---
|
||||
|
||||
@@ -50,7 +49,7 @@
|
||||
|
||||
::
|
||||
|
||||
openocd -f board/esp32h2-builtin.cfg -c "program_esp filename.bin 0x10000 verify exit"
|
||||
openocd -f board/esp32h21-builtin.cfg -c "program_esp filename.bin 0x10000 verify exit"
|
||||
|
||||
---
|
||||
|
||||
@@ -58,7 +57,7 @@
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
src/openocd -f board/esp32h2-builtin.cfg
|
||||
src/openocd -f board/esp32h21-builtin.cfg
|
||||
|
||||
---
|
||||
|
||||
@@ -66,13 +65,13 @@
|
||||
|
||||
.. code-block:: batch
|
||||
|
||||
src\openocd -f board/esp32h2-builtin.cfg
|
||||
src\openocd -f board/esp32h21-builtin.cfg
|
||||
|
||||
---
|
||||
|
||||
.. idf-py-openocd-default-cfg
|
||||
|
||||
.. |idf-py-def-cfg| replace:: ``-f board/esp32h2-builtin.cfg``
|
||||
.. |idf-py-def-cfg| replace:: ``-f board/esp32h21-builtin.cfg``
|
||||
|
||||
---
|
||||
|
||||
@@ -80,26 +79,26 @@
|
||||
|
||||
::
|
||||
|
||||
openocd -f board/esp32h2-builtin.cfg -c "init; halt; esp appimage_offset 0x210000"
|
||||
openocd -f board/esp32h21-builtin.cfg -c "init; halt; esp appimage_offset 0x210000"
|
||||
|
||||
---
|
||||
|
||||
.. openocd-cfg-files
|
||||
|
||||
.. list-table:: OpenOCD configuration files for ESP32-H2
|
||||
.. list-table:: OpenOCD configuration files for ESP32-H21
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Description
|
||||
* - ``board/esp32h2-builtin.cfg``
|
||||
- Board configuration file for ESP32-H2 through built-in USB, includes target and adapter configuration.
|
||||
* - ``board/esp32h2-ftdi.cfg``
|
||||
- Board configuration file for ESP32-H2 for via externally connected FTDI-based probe like ESP-Prog, includes target and adapter configuration.
|
||||
* - ``target/esp32h2.cfg``
|
||||
- ESP32-H2 target configuration file. Can be used together with one of the ``interface/`` configuration files.
|
||||
* - ``board/esp32h21-builtin.cfg``
|
||||
- Board configuration file for ESP32-H21 through built-in USB, includes target and adapter configuration.
|
||||
* - ``board/esp32h21-ftdi.cfg``
|
||||
- Board configuration file for ESP32-H21 for via externally connected FTDI-based probe like ESP-Prog, includes target and adapter configuration.
|
||||
* - ``target/esp32h21.cfg``
|
||||
- ESP32-H21 target configuration file. Can be used together with one of the ``interface/`` configuration files.
|
||||
* - ``interface/esp_usb_jtag.cfg``
|
||||
- JTAG adapter configuration file for ESP32-H2.
|
||||
- JTAG adapter configuration file for ESP32-H21.
|
||||
* - ``interface/ftdi/esp_ftdi.cfg``
|
||||
- JTAG adapter configuration file for ESP-Prog boards.
|
||||
|
||||
@@ -113,23 +112,23 @@
|
||||
|
||||
.. jtag-pins
|
||||
|
||||
.. list-table:: ESP32-H2 pins and JTAG signals
|
||||
.. list-table:: ESP32-H21 pins and JTAG signals
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - ESP32-H2 Pin
|
||||
* - ESP32-H21 Pin
|
||||
- JTAG Signal
|
||||
* - MTDO / GPIO3
|
||||
* - MTDO / GPIO1
|
||||
- TDO
|
||||
* - MTDI / GPIO5
|
||||
* - MTDI / GPIO3
|
||||
- TDI
|
||||
* - MTCK / GPIO4
|
||||
* - MTCK / GPIO2
|
||||
- TCK
|
||||
* - MTMS / GPIO2
|
||||
* - MTMS / GPIO0
|
||||
- TMS
|
||||
|
||||
.. |jtag-sel-gpio| replace:: GPIO25
|
||||
.. |jtag-gpio-list| replace:: GPIO2-GPIO5
|
||||
.. |jtag-sel-gpio| replace:: GPIO8
|
||||
.. |jtag-gpio-list| replace:: GPIO0-GPIO3
|
||||
|
||||
---
|
||||
|
||||
@@ -137,7 +136,7 @@
|
||||
|
||||
::
|
||||
|
||||
openocd -l openocd_log.txt -d3 -f board/esp32h2-builtin.cfg
|
||||
openocd -l openocd_log.txt -d3 -f board/esp32h21-builtin.cfg
|
||||
|
||||
---
|
||||
|
||||
@@ -145,7 +144,7 @@
|
||||
|
||||
::
|
||||
|
||||
openocd -d3 -f board/esp32h2-builtin.cfg 2>&1 | tee openocd.log
|
||||
openocd -d3 -f board/esp32h21-builtin.cfg 2>&1 | tee openocd.log
|
||||
|
||||
---
|
||||
|
||||
@@ -159,13 +158,13 @@
|
||||
|
||||
.. devkit-defs
|
||||
|
||||
.. |devkit-name| replace:: ESP32-H2
|
||||
.. |devkit-name-with-link| replace:: :doc:`ESP32-H2 <../../hw-reference/index>`
|
||||
.. |devkit-name| replace:: ESP32-H21
|
||||
.. |devkit-name-with-link| replace:: :doc:`ESP32-H21 <../../hw-reference/index>`
|
||||
|
||||
---
|
||||
|
||||
.. devkit-hw-config
|
||||
|
||||
* Out of the box, ESP32-H2 doesn't need any additional hardware configuration for JTAG debugging.
|
||||
* Out of the box, ESP32-H21 doesn't need any additional hardware configuration for JTAG debugging.
|
||||
|
||||
---
|
||||
|
||||
@@ -184,7 +184,7 @@ Open a terminal and set it up for using the ESP-IDF as described in the :ref:`se
|
||||
:start-after: run-openocd
|
||||
:end-before: ---
|
||||
|
||||
{IDF_TARGET_FTDI_CONFIG:default="Not Updated!", esp32s3="board/esp32s3-ftdi.cfg", esp32c3="board/esp32c3-ftdi.cfg", esp32c6="board/esp32c6-ftdi.cfg", esp32h2="board/esp32h2-ftdi.cfg", esp32h4="board/esp32h4-ftdi.cfg", esp32p4="board/esp32p4-ftdi.cfg", esp32c5="board/esp32c5-ftdi.cfg", esp32c61="board/esp32c61-ftdi.cfg"}
|
||||
{IDF_TARGET_FTDI_CONFIG:default="Not Updated!", esp32s3="board/esp32s3-ftdi.cfg", esp32c3="board/esp32c3-ftdi.cfg", esp32c6="board/esp32c6-ftdi.cfg", esp32h2="board/esp32h2-ftdi.cfg", esp32h21="board/esp32h21-ftdi.cfg", esp32h4="board/esp32h4-ftdi.cfg", esp32p4="board/esp32p4-ftdi.cfg", esp32c5="board/esp32c5-ftdi.cfg", esp32c61="board/esp32c61-ftdi.cfg"}
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
:link_to_translation:`en:[English]`
|
||||
|
||||
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE", esp32h2="JTAG_SEL_ENABLE", esp32p4="JTAG_SEL_ENABLE", esp32c5="JTAG_SEL_ENABLE", esp32c61="JTAG_SEL_ENABLE", esp32h4="JTAG_SEL_ENABLE"}
|
||||
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE", esp32h2="JTAG_SEL_ENABLE", esp32p4="JTAG_SEL_ENABLE", esp32c5="JTAG_SEL_ENABLE", esp32c61="JTAG_SEL_ENABLE", esp32h4="JTAG_SEL_ENABLE", esp32h21="JTAG_SEL_ENABLE"}
|
||||
|
||||
关于适配 OpenOCD 和 {IDF_TARGET_NAME} 的 JTAG 接口选择问题,请参考 :ref:`jtag-debugging-selecting-jtag-adapter` 章节。然后按照以下步骤进行设置,使其正常工作。
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
openocd -f board/esp32h21-builtin.cfg
|
||||
|
||||
.. |run-openocd-device-name| replace:: ESP32-H2 through built-in USB connection
|
||||
.. |run-openocd-device-name| replace:: ESP32-H21 through built-in USB connection
|
||||
|
||||
---
|
||||
|
||||
@@ -22,24 +22,23 @@
|
||||
::
|
||||
|
||||
user-name@computer-name:~/esp/esp-idf$ openocd -f board/esp32h21-builtin.cfg
|
||||
Open On-Chip Debugger v0.12.0-esp32-20221026-175-g0f5217b3-dirty (2023-02-02-11:32)
|
||||
Open On-Chip Debugger v0.12.0-esp32-20251215-41-g82a490d3-dirty (2026-01-22-17:06)
|
||||
Licensed under GNU GPL v2
|
||||
For bug reports, read
|
||||
http://openocd.org/doc/doxygen/bugs.html
|
||||
Info : only one transport option; autoselecting 'jtag'
|
||||
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
|
||||
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
|
||||
Warn : Transport "jtag" was already selected
|
||||
Info : Listening on port 6666 for tcl connections
|
||||
Info : Listening on port 4444 for telnet connections
|
||||
Info : esp_usb_jtag: serial (60:55:F9:F7:2C:3F)
|
||||
Info : esp_usb_jtag: serial (00:00:00:00:00:00)
|
||||
Info : esp_usb_jtag: Device found. Base speed 24000KHz, div range 1 to 255
|
||||
Info : clock speed 24000 kHz
|
||||
Info : JTAG tap: esp32h21.cpu tap/device found: 0x00010c25 (mfg: 0x612 (Espressif Systems), part: 0x0010, ver: 0x0)
|
||||
Info : datacount=2 progbufsize=16
|
||||
Info : Examined RISC-V core; found 1 harts
|
||||
Info : hart 0: XLEN=32, misa=0x40903105
|
||||
Info : starting gdb server for esp32h21 on 3333
|
||||
Info : JTAG tap: esp32h21.tap0 tap/device found: 0x00019c25 (mfg: 0x612 (Espressif Systems), part: 0x0019, ver: 0x0)
|
||||
Info : [esp32h21] datacount=2 progbufsize=16
|
||||
Info : [esp32h21] Examined RISC-V core; found 1 harts
|
||||
Info : [esp32h21] XLEN=32, misa=0x40103105
|
||||
Info : [esp32h21] Examination succeed
|
||||
Info : [esp32h21] starting gdb server on 3333
|
||||
Info : Listening on port 3333 for gdb connections
|
||||
|
||||
.. |run-openocd-cfg-file-err| replace:: ``Can't find board/esp32h21-builtin.cfg``
|
||||
@@ -86,20 +85,20 @@
|
||||
|
||||
.. openocd-cfg-files
|
||||
|
||||
.. list-table:: OpenOCD configuration files for ESP32-H2
|
||||
.. list-table:: OpenOCD configuration files for ESP32-H21
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Description
|
||||
* - ``board/esp32h21-builtin.cfg``
|
||||
- Board configuration file for ESP32-H2 through built-in USB, includes target and adapter configuration.
|
||||
- Board configuration file for ESP32-H21 through built-in USB, includes target and adapter configuration.
|
||||
* - ``board/esp32h21-ftdi.cfg``
|
||||
- Board configuration file for ESP32-H2 for via externally connected FTDI-based probe like ESP-Prog, includes target and adapter configuration.
|
||||
- Board configuration file for ESP32-H21 for via externally connected FTDI-based probe like ESP-Prog, includes target and adapter configuration.
|
||||
* - ``target/esp32h21.cfg``
|
||||
- ESP32-H2 target configuration file. Can be used together with one of the ``interface/`` configuration files.
|
||||
- ESP32-H21 target configuration file. Can be used together with one of the ``interface/`` configuration files.
|
||||
* - ``interface/esp_usb_jtag.cfg``
|
||||
- JTAG adapter configuration file for ESP32-H2.
|
||||
- JTAG adapter configuration file for ESP32-H21.
|
||||
* - ``interface/ftdi/esp_ftdi.cfg``
|
||||
- JTAG adapter configuration file for ESP-Prog boards.
|
||||
|
||||
@@ -113,23 +112,23 @@
|
||||
|
||||
.. jtag-pins
|
||||
|
||||
.. list-table:: ESP32-H2 pins and JTAG signals
|
||||
.. list-table:: ESP32-H21 pins and JTAG signals
|
||||
:widths: 25 75
|
||||
:header-rows: 1
|
||||
|
||||
* - ESP32-H2 Pin
|
||||
* - ESP32-H21 Pin
|
||||
- JTAG Signal
|
||||
* - MTDO / GPIO3
|
||||
* - MTDO / GPIO1
|
||||
- TDO
|
||||
* - MTDI / GPIO5
|
||||
* - MTDI / GPIO3
|
||||
- TDI
|
||||
* - MTCK / GPIO4
|
||||
* - MTCK / GPIO2
|
||||
- TCK
|
||||
* - MTMS / GPIO2
|
||||
* - MTMS / GPIO0
|
||||
- TMS
|
||||
|
||||
.. |jtag-sel-gpio| replace:: GPIO25
|
||||
.. |jtag-gpio-list| replace:: GPIO2-GPIO5
|
||||
.. |jtag-sel-gpio| replace:: GPIO8
|
||||
.. |jtag-gpio-list| replace:: GPIO0-GPIO3
|
||||
|
||||
---
|
||||
|
||||
@@ -159,13 +158,13 @@
|
||||
|
||||
.. devkit-defs
|
||||
|
||||
.. |devkit-name| replace:: ESP32-H2
|
||||
.. |devkit-name-with-link| replace:: :doc:`ESP32-H2 <../../hw-reference/index>`
|
||||
.. |devkit-name| replace:: ESP32-H1
|
||||
.. |devkit-name-with-link| replace:: :doc:`ESP32-H21 <../../hw-reference/index>`
|
||||
|
||||
---
|
||||
|
||||
.. devkit-hw-config
|
||||
|
||||
* Out of the box, ESP32-H2 doesn't need any additional hardware configuration for JTAG debugging.
|
||||
* Out of the box, ESP32-H21 doesn't need any additional hardware configuration for JTAG debugging.
|
||||
|
||||
---
|
||||
|
||||
@@ -184,7 +184,7 @@ OpenOCD 安装完成后就可以配置 {IDF_TARGET_NAME} 目标(即带 JTAG
|
||||
:start-after: run-openocd
|
||||
:end-before: ---
|
||||
|
||||
{IDF_TARGET_FTDI_CONFIG:default="Not Updated!", esp32s3="board/esp32s3-ftdi.cfg", esp32c3="board/esp32c3-ftdi.cfg", esp32c6="board/esp32c6-ftdi.cfg", esp32h2="board/esp32h2-ftdi.cfg", esp32h4="board/esp32h4-ftdi.cfg", esp32p4="board/esp32p4-ftdi.cfg", esp32c5="board/esp32c5-ftdi.cfg", esp32c61="board/esp32c61-ftdi.cfg"}
|
||||
{IDF_TARGET_FTDI_CONFIG:default="Not Updated!", esp32s3="board/esp32s3-ftdi.cfg", esp32c3="board/esp32c3-ftdi.cfg", esp32c6="board/esp32c6-ftdi.cfg", esp32h2="board/esp32h2-ftdi.cfg", esp32h21="board/esp32h21-ftdi.cfg", esp32h4="board/esp32h4-ftdi.cfg", esp32p4="board/esp32p4-ftdi.cfg", esp32c5="board/esp32c5-ftdi.cfg", esp32c61="board/esp32c61-ftdi.cfg"}
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user