kopia lustrzana https://github.com/espressif/esp-idf
docs: JTAG debugging update for ESP32-H2
rodzic
2129597e4d
commit
69b1d1786c
|
@ -11,18 +11,6 @@ api-guides/performance/speed
|
||||||
api-guides/performance/size
|
api-guides/performance/size
|
||||||
api-guides/performance/ram-usage
|
api-guides/performance/ram-usage
|
||||||
api-guides/performance/index
|
api-guides/performance/index
|
||||||
api-guides/jtag-debugging/debugging-examples
|
|
||||||
api-guides/jtag-debugging/configure-ft2232h-jtag
|
|
||||||
api-guides/jtag-debugging/tips-and-quirks
|
|
||||||
api-guides/jtag-debugging/using-debugger
|
|
||||||
api-guides/jtag-debugging/building-openocd-macos
|
|
||||||
api-guides/jtag-debugging/building-openocd-linux
|
|
||||||
api-guides/jtag-debugging/esp32h2.inc
|
|
||||||
api-guides/jtag-debugging/configure-other-jtag
|
|
||||||
api-guides/jtag-debugging/building-openocd-windows
|
|
||||||
api-guides/jtag-debugging/index
|
|
||||||
api-guides/jtag-debugging/esp32.inc
|
|
||||||
api-guides/jtag-debugging/configure-builtin-jtag
|
|
||||||
api-guides/partition-tables
|
api-guides/partition-tables
|
||||||
api-guides/startup
|
api-guides/startup
|
||||||
api-guides/RF_calibration
|
api-guides/RF_calibration
|
||||||
|
|
|
@ -2,7 +2,7 @@ Configure Other JTAG Interfaces
|
||||||
===============================
|
===============================
|
||||||
:link_to_translation:`zh_CN:[中文]`
|
:link_to_translation:`zh_CN:[中文]`
|
||||||
|
|
||||||
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE"}
|
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE", esp32h2="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.
|
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.
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ For guidance about which JTAG interface to select when using OpenOCD with {IDF_T
|
||||||
|
|
||||||
Burning ``DIS_USB_JTAG`` eFuse will permanently disable the connection between USB_SERIAL_JTAG and the JTAG port of the {IDF_TARGET_NAME}. JTAG interface can then be connected to |jtag-gpio-list|. Note that USB CDC functionality of USB_SERIAL_JTAG will still be usable, i.e., flashing and monitoring over USB CDC will still work.
|
Burning ``DIS_USB_JTAG`` eFuse will permanently disable the connection between USB_SERIAL_JTAG and the JTAG port of the {IDF_TARGET_NAME}. JTAG interface can then be connected to |jtag-gpio-list|. Note that USB CDC functionality of USB_SERIAL_JTAG will still be usable, i.e., flashing and monitoring over USB CDC will still work.
|
||||||
|
|
||||||
.. only:: esp32s3 or esp32c6
|
.. only:: not esp32c3
|
||||||
|
|
||||||
- Burning ``DIS_USB_JTAG`` eFuse will permanently disable the connection between USB_SERIAL_JTAG and the JTAG port of the {IDF_TARGET_NAME}. JTAG interface can then be connected to |jtag-gpio-list|. Note that USB CDC functionality of USB_SERIAL_JTAG will still be usable, i.e., flashing and monitoring over USB CDC will still work.
|
- Burning ``DIS_USB_JTAG`` eFuse will permanently disable the connection between USB_SERIAL_JTAG and the JTAG port of the {IDF_TARGET_NAME}. JTAG interface can then be connected to |jtag-gpio-list|. Note that USB CDC functionality of USB_SERIAL_JTAG will still be usable, i.e., flashing and monitoring over USB CDC will still work.
|
||||||
- Burning ``{IDF_TARGET_JTAG_SEL_EFUSE}`` eFuse will enable selection of JTAG interface by a strapping pin, |jtag-sel-gpio|. If the strapping pin is low when {IDF_TARGET_NAME} is reset, JTAG interface will use |jtag-gpio-list|. If the strapping pin is high, USB_SERIAL_JTAG will be used as the JTAG interface.
|
- Burning ``{IDF_TARGET_JTAG_SEL_EFUSE}`` eFuse will enable selection of JTAG interface by a strapping pin, |jtag-sel-gpio|. If the strapping pin is low when {IDF_TARGET_NAME} is reset, JTAG interface will use |jtag-gpio-list|. If the strapping pin is high, USB_SERIAL_JTAG will be used as the JTAG interface.
|
||||||
|
|
|
@ -21,7 +21,26 @@
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
TO BE UPDATED
|
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)
|
||||||
|
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: 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 : 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/esp32h2-builtin.cfg``
|
||||||
|
|
||||||
|
@ -73,8 +92,16 @@
|
||||||
|
|
||||||
* - Name
|
* - Name
|
||||||
- Description
|
- Description
|
||||||
* - TO BE UPDATED
|
* - ``board/esp32h2-builtin.cfg``
|
||||||
- TO BE UPDATED
|
- 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.
|
||||||
|
* - ``interface/esp_usb_jtag.cfg``
|
||||||
|
- JTAG adapter configuration file for ESP32-H2.
|
||||||
|
* - ``interface/ftdi/esp32_devkitj_v1.cfg``
|
||||||
|
- JTAG adapter configuration file for ESP-Prog boards.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -92,17 +119,17 @@
|
||||||
|
|
||||||
* - ESP32-H2 Pin
|
* - ESP32-H2 Pin
|
||||||
- JTAG Signal
|
- JTAG Signal
|
||||||
* - MTDO
|
* - MTDO / GPIO3
|
||||||
- TDO
|
- TDO
|
||||||
* - MTDI
|
* - MTDI / GPIO5
|
||||||
- TDI
|
- TDI
|
||||||
* - MTCK
|
* - MTCK / GPIO4
|
||||||
- TCK
|
- TCK
|
||||||
* - MTMS
|
* - MTMS / GPIO2
|
||||||
- TMS
|
- TMS
|
||||||
|
|
||||||
.. |jtag-sel-gpio| replace:: TO BE UPDATED
|
.. |jtag-sel-gpio| replace:: GPIO25
|
||||||
.. |jtag-gpio-list| replace:: TO BE UPDATED
|
.. |jtag-gpio-list| replace:: GPIO2-GPIO5
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -171,13 +171,15 @@ Open a terminal and set it up for using the ESP-IDF as described in the :ref:`se
|
||||||
:start-after: run-openocd
|
:start-after: run-openocd
|
||||||
:end-before: ---
|
: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"}
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The files provided after ``-f`` above are specific for |run-openocd-device-name|. You may need to provide different files depending on the hardware that is used. For guidance see :ref:`jtag-debugging-tip-openocd-configure-target`.
|
The files provided after ``-f`` above are specific for |run-openocd-device-name|. You may need to provide different files depending on the hardware that is used. For guidance see :ref:`jtag-debugging-tip-openocd-configure-target`.
|
||||||
|
|
||||||
.. only:: esp32c3
|
.. only:: SOC_USB_SERIAL_JTAG_SUPPORTED
|
||||||
|
|
||||||
For example, ``board/esp32c3-ftdi.cfg`` can be used for a custom board with an FT2232H or FT232H chip used for JTAG connection, or with ESP-Prog.
|
For example, ``{IDF_TARGET_FTDI_CONFIG}`` can be used for a custom board with an FT2232H or FT232H chip used for JTAG connection, or with ESP-Prog.
|
||||||
|
|
||||||
.. highlight:: none
|
.. highlight:: none
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
==================
|
==================
|
||||||
:link_to_translation:`en:[English]`
|
:link_to_translation:`en:[English]`
|
||||||
|
|
||||||
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE"}
|
{IDF_TARGET_JTAG_SEL_EFUSE:default="Not Updated!", esp32s3="STRAP_JTAG_SEL", esp32c6="JTAG_SEL_ENABLE", esp32h2="JTAG_SEL_ENABLE"}
|
||||||
|
|
||||||
关于适配 OpenOCD 和 {IDF_TARGET_NAME} 的 JTAG 接口选择问题,请参考 :ref:`jtag-debugging-selecting-jtag-adapter` 章节。然后按照以下步骤进行设置,使其正常工作。
|
关于适配 OpenOCD 和 {IDF_TARGET_NAME} 的 JTAG 接口选择问题,请参考 :ref:`jtag-debugging-selecting-jtag-adapter` 章节。然后按照以下步骤进行设置,使其正常工作。
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
烧录 ``DIS_USB_JTAG`` eFuse 后,USB_SERIAL_JTAG 和 {IDF_TARGET_NAME} 的 JTAG 接口之间的连接将被永久禁用,此后您可以将 JTAG 接口连接到 |jtag-gpio-list|。注意,烧录后,USB_SERIAL_JTAG 的 USB CDC 功能仍然可用,即仍然可以通过 USB CDC 进行烧录和查看日志。
|
烧录 ``DIS_USB_JTAG`` eFuse 后,USB_SERIAL_JTAG 和 {IDF_TARGET_NAME} 的 JTAG 接口之间的连接将被永久禁用,此后您可以将 JTAG 接口连接到 |jtag-gpio-list|。注意,烧录后,USB_SERIAL_JTAG 的 USB CDC 功能仍然可用,即仍然可以通过 USB CDC 进行烧录和查看日志。
|
||||||
|
|
||||||
.. only:: esp32s3 or esp32c6
|
.. only:: not esp32c3
|
||||||
|
|
||||||
- 烧录 ``DIS_USB_JTAG`` eFuse 后,USB_SERIAL_JTAG 和 {IDF_TARGET_NAME} 的 JTAG 接口之间的连接将被永久禁用,此后您可以将 JTAG 接口连接到 |jtag-gpio-list|。注意,烧录后,USB_SERIAL_JTAG 的 USB CDC 功能仍然可用,即仍然可以通过 USB CDC 进行烧录和查看日志。
|
- 烧录 ``DIS_USB_JTAG`` eFuse 后,USB_SERIAL_JTAG 和 {IDF_TARGET_NAME} 的 JTAG 接口之间的连接将被永久禁用,此后您可以将 JTAG 接口连接到 |jtag-gpio-list|。注意,烧录后,USB_SERIAL_JTAG 的 USB CDC 功能仍然可用,即仍然可以通过 USB CDC 进行烧录和查看日志。
|
||||||
- 烧录 ``{IDF_TARGET_JTAG_SEL_EFUSE}`` eFuse 后,JTAG 接口的选择将由 strapping 管脚 |jtag-sel-gpio| 来决定。{IDF_TARGET_NAME} 复位时,如果该 strapping 管脚为低电平,JTAG 接口将使用 |jtag-gpio-list|;如果为高电平,USB_SERIAL_JTAG 将被用作 JTAG 接口。
|
- 烧录 ``{IDF_TARGET_JTAG_SEL_EFUSE}`` eFuse 后,JTAG 接口的选择将由 strapping 管脚 |jtag-sel-gpio| 来决定。{IDF_TARGET_NAME} 复位时,如果该 strapping 管脚为低电平,JTAG 接口将使用 |jtag-gpio-list|;如果为高电平,USB_SERIAL_JTAG 将被用作 JTAG 接口。
|
||||||
|
|
|
@ -21,7 +21,26 @@
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
TO BE UPDATED
|
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)
|
||||||
|
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: 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 : 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/esp32h2-builtin.cfg``
|
||||||
|
|
||||||
|
@ -73,8 +92,16 @@
|
||||||
|
|
||||||
* - Name
|
* - Name
|
||||||
- Description
|
- Description
|
||||||
* - TO BE UPDATED
|
* - ``board/esp32h2-builtin.cfg``
|
||||||
- TO BE UPDATED
|
- 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.
|
||||||
|
* - ``interface/esp_usb_jtag.cfg``
|
||||||
|
- JTAG adapter configuration file for ESP32-H2.
|
||||||
|
* - ``interface/ftdi/esp32_devkitj_v1.cfg``
|
||||||
|
- JTAG adapter configuration file for ESP-Prog boards.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -92,17 +119,17 @@
|
||||||
|
|
||||||
* - ESP32-H2 Pin
|
* - ESP32-H2 Pin
|
||||||
- JTAG Signal
|
- JTAG Signal
|
||||||
* - MTDO
|
* - MTDO / GPIO3
|
||||||
- TDO
|
- TDO
|
||||||
* - MTDI
|
* - MTDI / GPIO5
|
||||||
- TDI
|
- TDI
|
||||||
* - MTCK
|
* - MTCK / GPIO4
|
||||||
- TCK
|
- TCK
|
||||||
* - MTMS
|
* - MTMS / GPIO2
|
||||||
- TMS
|
- TMS
|
||||||
|
|
||||||
.. |jtag-sel-gpio| replace:: TO BE UPDATED
|
.. |jtag-sel-gpio| replace:: GPIO25
|
||||||
.. |jtag-gpio-list| replace:: TO BE UPDATED
|
.. |jtag-gpio-list| replace:: GPIO2-GPIO5
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -171,13 +171,15 @@ OpenOCD 安装完成后就可以配置 {IDF_TARGET_NAME} 目标(即带 JTAG
|
||||||
:start-after: run-openocd
|
:start-after: run-openocd
|
||||||
:end-before: ---
|
: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"}
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
上述命令中 ``-f`` 选项后跟的配置文件专用于 |run-openocd-device-name|。基于具体使用的硬件,您可能需要选择不同的配置文件,具体内容请参阅 :ref:`jtag-debugging-tip-openocd-configure-target`。
|
上述命令中 ``-f`` 选项后跟的配置文件专用于 |run-openocd-device-name|。基于具体使用的硬件,您可能需要选择不同的配置文件,具体内容请参阅 :ref:`jtag-debugging-tip-openocd-configure-target`。
|
||||||
|
|
||||||
.. only:: esp32c3
|
.. only:: SOC_USB_SERIAL_JTAG_SUPPORTED
|
||||||
|
|
||||||
例如,对于带有用于 JTAG 连接的 FT2232H 或 FT232H 芯片的定制板,或带有 ESP-Prog 的定制板,可使用 ``board/esp32c3-ftdi.cfg``。
|
例如,对于带有用于 JTAG 连接的 FT2232H 或 FT232H 芯片的定制板,或带有 ESP-Prog 的定制板,可使用 ``{IDF_TARGET_FTDI_CONFIG}``。
|
||||||
|
|
||||||
.. highlight:: none
|
.. highlight:: none
|
||||||
|
|
||||||
|
|
|
@ -42,4 +42,5 @@ OPENOCD_TAGET_CONFIG: Dict[str, str] = {
|
||||||
'esp32c3': '-f board/esp32c3-builtin.cfg',
|
'esp32c3': '-f board/esp32c3-builtin.cfg',
|
||||||
'esp32s3': '-f board/esp32s3-builtin.cfg',
|
'esp32s3': '-f board/esp32s3-builtin.cfg',
|
||||||
'esp32c6': '-f board/esp32c6-builtin.cfg',
|
'esp32c6': '-f board/esp32c6-builtin.cfg',
|
||||||
|
'esp32h2': '-f board/esp32h2-builtin.cfg',
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue