2021-05-24 07:08:00 +00:00
|
|
|
|
.. This file gets included from other .rst files in this folder.
|
|
|
|
|
.. It contains target-specific snippets.
|
|
|
|
|
.. Comments and '---' lines act as delimiters.
|
|
|
|
|
..
|
|
|
|
|
.. This is necessary mainly because RST doesn't support substitutions
|
|
|
|
|
.. (defined in RST, not in Python) inside code blocks. If that is ever implemented,
|
|
|
|
|
.. These code blocks can be moved back to the main .rst files, with target-specific
|
|
|
|
|
.. file names being replaced by substitutions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. run-openocd
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
openocd -f board/esp32s3-builtin.cfg
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
.. |run-openocd-device-name| replace:: ESP32-S3
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-output
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
user-name@computer-name:~/esp/esp-idf$ openocd -f board/esp32s3-builtin.cfg
|
|
|
|
|
Open On-Chip Debugger v0.10.0-esp32-20210902 (2021-10-05-23:44)
|
2021-05-24 07:08:00 +00:00
|
|
|
|
Licensed under GNU GPL v2
|
|
|
|
|
For bug reports, read
|
2021-10-11 19:15:31 +00:00
|
|
|
|
http://openocd.org/doc/doxygen/bugs.html
|
|
|
|
|
debug_level: 2
|
|
|
|
|
|
|
|
|
|
Info : only one transport option; autoselect 'jtag'
|
|
|
|
|
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: Device found. Base speed 40000KHz, div range 1 to 255
|
|
|
|
|
Info : clock speed 40000 kHz
|
2021-05-24 07:08:00 +00:00
|
|
|
|
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
|
2021-10-11 19:15:31 +00:00
|
|
|
|
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
|
|
|
|
|
Info : esp32s3.cpu0: Debug controller was reset.
|
|
|
|
|
Info : esp32s3.cpu0: Core was reset.
|
|
|
|
|
Info : esp32s3.cpu1: Debug controller was reset.
|
|
|
|
|
Info : esp32s3.cpu1: Core was reset.
|
|
|
|
|
Info : Listening on port 3333 for gdb connections
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
.. |run-openocd-cfg-file-err| replace:: ``Can't find board/esp32s3-builtin.cfg``
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-upload
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
openocd -f board/esp32s3-builtin.cfg -c "program_esp filename.bin 0x10000 verify exit"
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-src-linux
|
|
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
src/openocd -f board/esp32s3-builtin.cfg
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-src-win
|
|
|
|
|
|
|
|
|
|
.. code-block:: batch
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
src\openocd -f board/esp32s3-builtin.cfg
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. idf-py-openocd-default-cfg
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
.. |idf-py-def-cfg| replace:: ``-f board/esp32s3-builtin.cfg``
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-appimage-offset
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
openocd -f board/esp32s3-builtin.cfg -c "init; halt; esp appimage_offset 0x210000"
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. openocd-cfg-files
|
|
|
|
|
|
2021-11-26 07:33:32 +00:00
|
|
|
|
.. list-table:: ESP32-S3 相关的 OpenOCD 配置文件
|
2021-05-24 07:08:00 +00:00
|
|
|
|
:widths: 25 75
|
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
2021-11-26 07:33:32 +00:00
|
|
|
|
* - 名称
|
|
|
|
|
- 描述
|
2021-10-11 19:15:31 +00:00
|
|
|
|
* - ``board/esp32s3-builtin.cfg``
|
2021-11-26 07:33:32 +00:00
|
|
|
|
- ESP32-S3 系列开发板的配置文件,用于通过内置的 USB JTAG 进行调试,包括 ESP32-S3 目标配置和适配器配置。
|
2021-10-11 19:15:31 +00:00
|
|
|
|
* - ``board/esp32s3-ftdi.cfg``
|
2021-11-26 07:33:32 +00:00
|
|
|
|
- ESP32-S3 系列开发板的配置文件,用于通过外部连接的基于 FTDI 的探头,如 ESP-Prog,包括 ESP32-S3 目标配置和适配器配置。
|
2021-05-24 07:08:00 +00:00
|
|
|
|
* - ``target/esp32s3.cfg``
|
2021-11-26 07:33:32 +00:00
|
|
|
|
- ESP32-S3 目标配置文件,可以和某个 ``interface/`` 下的配置文件一同使用
|
2021-10-11 19:15:31 +00:00
|
|
|
|
* - ``interface/ftdi/esp_usb_jtag.cfg``
|
2021-11-26 07:33:32 +00:00
|
|
|
|
- 适用于 ESP32-S3 的 JTAG 适配器配置文件。
|
2021-05-24 07:08:00 +00:00
|
|
|
|
* - ``interface/ftdi/esp32_devkitj_v1.cfg``
|
2021-11-26 07:33:32 +00:00
|
|
|
|
- 适用于 ESP-Prog 的 JTAG 适配器配置文件。
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. openocd-target-specific-config-vars
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. jtag-pins
|
|
|
|
|
|
2021-11-26 07:33:32 +00:00
|
|
|
|
.. list-table:: ESP32-S3 管脚和 JTAG 接口信号
|
2021-05-24 07:08:00 +00:00
|
|
|
|
:widths: 25 75
|
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
2021-11-26 07:33:32 +00:00
|
|
|
|
* - ESP32-S3 管脚
|
|
|
|
|
- JTAG 信号
|
|
|
|
|
* - MTDO / GPIO40
|
2021-05-24 07:08:00 +00:00
|
|
|
|
- TDO
|
2021-11-26 07:33:32 +00:00
|
|
|
|
* - MTDI / GPIO41
|
2021-05-24 07:08:00 +00:00
|
|
|
|
- TDI
|
2021-11-26 07:33:32 +00:00
|
|
|
|
* - MTCK / GPIO39
|
2021-05-24 07:08:00 +00:00
|
|
|
|
- TCK
|
2021-11-26 07:33:32 +00:00
|
|
|
|
* - MTMS / GPIO42
|
2021-05-24 07:08:00 +00:00
|
|
|
|
- TMS
|
|
|
|
|
|
2021-11-26 07:33:32 +00:00
|
|
|
|
.. |jtag-sel-gpio| replace:: GPIO3
|
|
|
|
|
.. |jtag-gpio-list| replace:: GPIO39-GPIO42
|
|
|
|
|
|
2021-05-24 07:08:00 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-d3
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
openocd -l openocd_log.txt -d3 -f board/esp32s3-builtin.cfg
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-openocd-d3-tee
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2021-10-11 19:15:31 +00:00
|
|
|
|
openocd -d3 -f board/esp32s3-builtin.cfg 2>&1 | tee openocd.log
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. run-gdb-remotelog
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
xtensa-esp32s3-elf-gdb -ex "set remotelogfile gdb_log.txt" <all other options>
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. devkit-defs
|
|
|
|
|
|
|
|
|
|
.. |devkit-name| replace:: ESP32-S3
|
2021-11-26 07:33:32 +00:00
|
|
|
|
.. |devkit-name-with-link| replace:: :doc:`ESP32-S3 <../../hw-reference/index>`
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
.. devkit-hw-config
|
|
|
|
|
|
2021-11-26 07:33:32 +00:00
|
|
|
|
* 开箱即用,ESP32-S3 不需要任何其他硬件配置即可进行 JTAG 调试。 但是,如果遇到问题,请检查 “JTAG” DIP 开关的 2-5 号是否在 “ON” 位置。
|
2021-05-24 07:08:00 +00:00
|
|
|
|
|
|
|
|
|
---
|