ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

zhouly
Posts: 3
Joined: Fri Sep 10, 2021 2:46 am

ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

Postby zhouly » Fri Sep 10, 2021 2:51 am

程序的下载烧入都是可以的,
命令行openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
force hard breakpoints
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: esp_usb_jtag: could not find or open device!

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

Postby ESP_Gargamel » Fri Sep 10, 2021 11:37 am

看下:https://docs.espressif.com/projects/esp ... -jtag.html
确保设备可以被电脑识别到。

zhouly
Posts: 3
Joined: Fri Sep 10, 2021 2:46 am

Re: ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

Postby zhouly » Mon Sep 13, 2021 1:35 am

开发板只需要USB线连接就行了吧?
在设备管理器中看到的是 Silicon Labs CP210x USB to UART Bridge(COM10).

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

Postby ESP_Gargamel » Thu Sep 16, 2021 8:21 am

不是,builtin 的 jtag 需要用到 C3 的 USB 管脚,IO18 和 IO19,需要接 USB 线,你可以买一个 USB 转杜邦线,如这样的:https://item.taobao.com/item.htm?spm=a2 ... etail。板子上的 USB 口是接到转串口的芯片上的。

leng739
Posts: 3
Joined: Fri Sep 24, 2021 6:28 am

Re: ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

Postby leng739 » Fri Sep 24, 2021 6:36 am

你好,我遇到了与你一样的问题,请问你解决了吗,是如何解决的呢,想请教一下,谢谢。

zhouly
Posts: 3
Joined: Fri Sep 10, 2021 2:46 am

Re: ESP32-c3-devkitm1想去gdb调试,发现识别不到设备

Postby zhouly » Sun Sep 26, 2021 1:46 am

ESP_Gargamel wrote:
Thu Sep 16, 2021 8:21 am
不是,builtin 的 jtag 需要用到 C3 的 USB 管脚,IO18 和 IO19,需要接 USB 线,你可以买一个 USB 转杜邦线,如这样的:https://item.taobao.com/item.htm?spm=a2 ... etail。板子上的 USB 口是接到转串口的芯片上的。
是可以识别到了,然后我用openocd -f board\esp32c3-builtin.cfg开启openocd
命令行openocd -f board\esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
force hard breakpoints
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
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : [0] Found 8 triggers
Info : Listening on port 3333 for gdb connections


再在另一个终端输入xtensa-esp32-elf-gdb -x gdbinit build/hello-world.elf
命令行xtensa-esp32-elf-gdb -x gdbinit build/hello-world.elf
GNU gdb (crosstool-NG esp-2020r3) 8.1.0.20180627-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/hello-world.elf...done.
warning: Target-supplied registers are not supported by the current architecture
0x00000000 in ?? ()
JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Hardware assisted breakpoint 1 at 0x42004ea0: file ../main/hello_world_main.c, line 17.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00000000 in ?? ()
(gdb)
发现使用不了gdb。应该怎样操作呢?

Who is online

Users browsing this forum: No registered users and 77 guests