Trouble debugging ESP-32 with ESP-PROG and OpenOCD

199 views Asked by At

I am new to JTAG debugging with the ESP32 and when I start OpenOCD, the controller seems to be resetting indefinetely.

  • macOS Big Sur v11.1, although also tried on Windows 10 and got the same output.
  • OpenOCD v0.10.0-esp32-20210401
  • ESP-IDF v4.3.1
  • Board is ESP32 Devkit v1 with WROOM-32 module

No external hardware is connected. Only the 4 jtag pins and GND with jumpers between ESP32 and ESP-PROG. I also verified that the connections are correct.

Weird thing is the first time I tried it (on Windows 10) everything seemed to work correctly and I was able to hit a breakpoint in the program. Then, after I built and flashed the code again I could not debug anymore and since then it has stayed the same. I have also looked for other threads or forums for answers but haven't been able to solve the issue.

OpenOCD output after running openocd -f board/esp32-wrover-kit-3.3v.cfg on the ESP-IDF Terminal

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 : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : Listening on port 3333 for gdb connections
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Debug controller was reset.
^Cshutdown command invoked

Note that I changed the adapter speed to 10000 kHz instead of the default 20000 to see if it changed anything, with no luck.

0

There are 0 answers