ESP32-C3目前支持单步调试吗?ESP32-S2呢?[IDFGH-5362]

gzy302577
Posts: 11
Joined: Sun May 30, 2021 1:03 pm

ESP32-C3目前支持单步调试吗?ESP32-S2呢?[IDFGH-5362]

Postby gzy302577 » Tue Jun 01, 2021 7:20 am

ESP32-C3-DevKitM-1或者ESP32-S2、ESP32-WROOM-32D目前能够进行单步调试吗,官方文档中,C3芯片中英文版的Programming Guide说法上有些出入:

中文版https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-guides/jtag-debugging/index.html
英文版https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html#introduction
中文版描述只有ESP-S2-Kaluga-1板载了JTAG调试接口,而英文版说ESP32-C3可以直接用USB进行调试:“This is made possible by the ESP32-C3 chip itself, which provides two USB channels, one for JTAG and one for the USB terminal connection. ”

另外,跟据Github上的说法似乎C3现在不支持openocd?
https://github.com/espressif/openocd-esp32/issues/158
:"OpenOCD has no flash support yet for ESP32-C3. It is disabled by default. It is planned for the next release.
So for now you need to use idf.py or esptool.py directly to program esp32c3."

几个说法比较杂乱,请问ESP32-C3和ESP32-S2或WROOM系列是否支持单步调试

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

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?

Postby ESP_Gargamel » Wed Jun 02, 2021 3:02 am

都支持。
C3 的 USB 可以直接拿来做 JTAG 调试,你在淘宝买个类似这种 https://item.taobao.com/item.htm?spm=a2 ... =16#detail USB 转杜邦线,USB + & - 接到 C3 开发板对应管脚。
openocd 用20210401 以上版本,用命令 openocd -f board/esp32c3-builtin.cfg 开启代理,烧写的话还是先直接用 idf.py flash。

gzy302577
Posts: 11
Joined: Sun May 30, 2021 1:03 pm

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?

Postby gzy302577 » Sun Jun 06, 2021 7:47 am

ESP_Gargamel wrote:
Wed Jun 02, 2021 3:02 am
都支持。
C3 的 USB 可以直接拿来做 JTAG 调试,你在淘宝买个类似这种 https://item.taobao.com/item.htm?spm=a2 ... =16#detail USB 转杜邦线,USB + & - 接到 C3 开发板对应管脚。
openocd 用20210401 以上版本,用命令 openocd -f board/esp32c3-builtin.cfg 开启代理,烧写的话还是先直接用 idf.py flash。
您好!按您的方法解决了No device的问题,但是在eclipse调试一直显示:“Break at address "0x0" with no debug information available, or outside of program code.” Debugger console显示:“Thread 2 received signal SIGTRAP, Trace/breakpoint trap. 0x00000000 in ?? ()”无法进行调试是什么原因呢?

最后调试界面是这样,点击resume一直停留在这个界面,用的是闪灯例程闪灯处设置断点,灯光也未闪烁(但是点击Skip All Breakpoints灯光闪烁)。
Image

调试设置如下图:

Image
Image

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

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?

Postby ESP_Gargamel » Mon Jun 07, 2021 1:41 am

附图是我的设置,你可以参考。
Attachments
debug-1.png
debug-1.png (92.84 KiB) Viewed 9899 times
debug-2.png
debug-2.png (82.94 KiB) Viewed 9899 times

gzy302577
Posts: 11
Joined: Sun May 30, 2021 1:03 pm

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?

Postby gzy302577 » Mon Jun 07, 2021 10:23 am

ESP_Gargamel wrote:
Mon Jun 07, 2021 1:41 am
附图是我的设置,你可以参考。
您好!参照您的设置配置了各项内容,调试显示“Could not determine GDB version after sending: riscv32-esp-elf-gdb --version, response: ”是什么原因呢?gdb client换用“..\.espressif\tools\riscv32-esp-elf\1.24.0.123_64eb9ff-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-gdb.exe”也是一样。
直接去对应目录执行riscv32-esp-elf-gdb.exe,显示“由于找不到libgcc_s_seh-1.dll,无法继续执行代码”,下载该文件至riscv32...exe所在文件夹后,显示“由于找不到libwinpthread-1.dll ...”,同样下载该dll后,执行riscv32-esp-elf-gdb.exe,显示应用程序无法正常启动(0xc000007b),这个是什么原因啊,跟MinGW有关吗。
调试的问题已经困扰我好几天了,希望您能指导一下,非常感谢。

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

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?

Postby ESP_Gargamel » Mon Jun 07, 2021 12:07 pm

很少使用 Windows,试了下,Windows 下执行 riscv32-esp-elf-gdb 没有任何输出,会内部确认一下。

Ken4750
Posts: 3
Joined: Sat Aug 14, 2021 5:33 am

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?[IDFGH-5362]

Postby Ken4750 » Sat Aug 14, 2021 5:40 am

我也遇到了同样的问题,有什么进展吗

Ken4750
Posts: 3
Joined: Sat Aug 14, 2021 5:33 am

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?

Postby Ken4750 » Sat Aug 14, 2021 5:41 am

gzy302577 wrote:
Mon Jun 07, 2021 10:23 am
ESP_Gargamel wrote:
Mon Jun 07, 2021 1:41 am
附图是我的设置,你可以参考。
您好!参照您的设置配置了各项内容,调试显示“Could not determine GDB version after sending: riscv32-esp-elf-gdb --version, response: ”是什么原因呢?gdb client换用“..\.espressif\tools\riscv32-esp-elf\1.24.0.123_64eb9ff-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-gdb.exe”也是一样。
直接去对应目录执行riscv32-esp-elf-gdb.exe,显示“由于找不到libgcc_s_seh-1.dll,无法继续执行代码”,下载该文件至riscv32...exe所在文件夹后,显示“由于找不到libwinpthread-1.dll ...”,同样下载该dll后,执行riscv32-esp-elf-gdb.exe,显示应用程序无法正常启动(0xc000007b),这个是什么原因啊,跟MinGW有关吗。
调试的问题已经困扰我好几天了,希望您能指导一下,非常感谢。
你解决了这个问题吗?

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

Re: ESP32-C3目前支持单步调试吗?ESP32-S2呢?[IDFGH-5362]

Postby ESP_Gargamel » Fri Aug 20, 2021 3:41 am

你用 https://github.com/espressif/crosstool- ... -win64.zip 替换一下 .espressif\tools\riscv32-esp-elf 的 toolchain。

Who is online

Users browsing this forum: No registered users and 150 guests