I’m not sure if debugging this board is possible without an ESP-PROG but I’m hoping it can be. I have one of these esp32c3 variants Lolin_c3_mini. C3 mini — WEMOS documentation
It has the d+ and d- pins routed to the USB. When plugging this board into the computer I get two USB JTAG/serial debug devices in device manager.
I’m getting an error with GDB and it wants me to open the source config file but I’m not sure what I’m supposed to put in there. All the documentation I could find is for the ESP PROG or JLINK adapters for the esp32.
Reading symbols from c:.pio\build\esp32c3\firmware.elf…
There’s two interfaces 0 and 2. Should I update both or just one.
Currently
Interface 2 is showing WINUSB (v10.0.19041.1)
Interface 0 is showing usbser (v1.0.0.0)
Hm nope, still no OpenOCD connection. But now also both interface 0 and 2 are libusb-win32. Does the serial port still exist? Have you tried loading WinUSB drivers?
Hm, well if it’s not accepting WinUSB or LibUSB then I don’t know Maybe try download the binary releases straight from Releases · espressif/openocd-esp32 · GitHub and execute the
C:\openocd-esp32\bin>openocd.exe -s share\openocd\scripts -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read OpenOCD: Bug Reporting
Info : only one transport option; autoselect ‘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
Error: libusb_get_string_descriptor_ascii() failed with -5
I installed the libusbK (v3.1.0.0) driver and got this result in OpenOCD.
On interface 2
Is this better?
C:\openocd-esp32\bin>openocd.exe -s share\openocd\scripts -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read OpenOCD: Bug Reporting
Info : only one transport option; autoselect ‘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: 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 : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : starting gdb server for esp32c3 on 3333
Info : Listening on port 3333 for gdb connections