ESP32-C3: debugging is not working

jsmith56x
Posts: 13
Joined: Sun Oct 13, 2024 2:51 pm

ESP32-C3: debugging is not working

Postby jsmith56x » Sat Oct 19, 2024 1:10 pm

We have just purchased a card
https://docs.espressif.com/projects/esp ... index.html

I have downloaded and installed Espressif IDE
I have created the 'hello_world' project using 'New/Espressif IDF project'

For debugging I have followed
https://github.com/espressif/idf-eclips ... bugging.md

However the debugging is not working. Here is the log
Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)
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
Flashing "C:/Work/ESP32/esp32c3_test/build/bootloader/bootloader.bin" at 0x0
** program_esp input args <0x0 verify> **
Error: esp_usb_jtag: could not find or open device!
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-es ... ooting-FAQ
** OpenOCD init failed **
shutdown command invoked
** Flashing Failed **
-1
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: [esp32c3] Unsupported DTM version: -1
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-es ... ooting-FAQ
Error: [esp32c3] Could not identify target type.
Please refer to the troubleshooting guide below to identify the problem.
https://github.com/espressif/openocd-es ... ooting-FAQ
I have also tried the board in Arduino. The program uploading is working however the debugging is not. I have tried the Arduino program uploading on a real Linux (not VM) with the same result: uploading is working but the debug is not. What I made wrong? Or I have to press BOOT and RESET buttons in a specific order?

With the same cable I can debug an Stm32 MCU on assembly level in Eclipse.

My USB settings
See usb_settings in attachments
VID PID 10C4:EA60

Tried Zadig with no success also.

Please help.
Attachments
usb_settings.png
usb_settings.png (3.55 KiB) Viewed 1191 times

ESP_kondalkolipaka
Posts: 188
Joined: Wed Jul 17, 2019 5:26 pm

Re: ESP32-C3: debugging is not working

Postby ESP_kondalkolipaka » Mon Oct 21, 2024 3:24 pm

Hello,

> Error: esp_usb_jtag: could not find or open device!
This tells us that OpenOCD is unable to communicate with your ESP32-C3 board so this could be due to the configuration mismatch in the OpenOCD configuration wizard. Make sure select built-in USB-JTAG like below!
Screenshot 2024-10-21 at 5.22.01 PM.png
Screenshot 2024-10-21 at 5.22.01 PM.png (299.99 KiB) Viewed 1093 times

Edmundo
Posts: 3
Joined: Sat Oct 26, 2024 8:38 am

Re: ESP32-C3: debugging is not working

Postby Edmundo » Mon Nov 18, 2024 10:35 am

Hello,
if your ESP board has the same basic electrical struktur as the ESP32-C3-DevKit-02 it only has one USB connector that is located to the UART pads of the ESP32-C3 which enables you to capture the serial output and to download a firmware file.
For using the internal USB Debugger you have to connect the WROOM pads GPIO18 and GPIO19 to usb.
c3-wroom.PNG
c3-wroom.PNG (66.17 KiB) Viewed 259 times
The DevKit-02 (I think your board also) has an jumper area located on the board which must be modified in the way that the existing resistors R1 and R4 must be placed to the R2 and R3 positions (not connected at default).
devkit-c3_jumperarea.PNG
devkit-c3_jumperarea.PNG (20.86 KiB) Viewed 259 times
You have to connect and additional USB-serial device (with level shifter) to the Tx and Rx pins of your board to enable the firmware download.

Edmundo
myboard.png
myboard.png (177.7 KiB) Viewed 259 times
Hope this helps,

Who is online

Users browsing this forum: No registered users and 44 guests