ESP32 Debugging using openOCD

Anurag Paul
Posts: 11
Joined: Thu Jul 14, 2022 5:07 am

ESP32 Debugging using openOCD

Postby Anurag Paul » Tue Jul 26, 2022 12:48 pm

Hi Team
I am trying to achieve debugging in espressif IDE (Not eclipse).
I follow the [url][https://docs.espressif.com/projects/esp ... up-openocd].

But I am getting error while running the command,
openocd -f board/esp32-wrover-kit-3.3v.cfg

error:

C:\Espressif\frameworks\esp-idf-v4.2>cd workspace/blink

C:\Espressif\frameworks\esp-idf-v4.2\workspace\blink>openocd -f board/esp32-wrover-kit-3.3v.cfg
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
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
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : target esp32.cpu0 examination failed
Warn : target esp32.cpu1 examination failed
Info : starting gdb server for esp32.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: Target not examined yet
Error executing event gdb-attach on target esp32.cpu0:

Warn : No symbols for FreeRTOS!
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_mem
ory_map disable'.
Error: attempted 'gdb' connection rejected
Info : accepting 'gdb' connection on tcp/3333
Error: Target not examined yet
Error executing event gdb-attach on target esp32.cpu0:

Warn : No symbols for FreeRTOS!
Error: Target not halted
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_mem
ory_map disable'.
Error: attempted 'gdb' connection rejected
shutdown command invoked
Error: libusb_handle_events() failed with LIBUSB_ERROR_IO
Error: unable to purge ftdi rx buffers: LIBUSB_ERROR_IO
Error: error while flushing MPSSE queue: -4
Error: Failed to clear OCDDCR_ENABLEOCD!
Error: libusb_handle_events() failed with LIBUSB_ERROR_IO
Error: unable to purge ftdi rx buffers: LIBUSB_ERROR_IO
Error: error while flushing MPSSE queue: -4
Error: Failed to clear OCDDCR_ENABLEOCD!

C:\Espressif\frameworks\esp-idf-v4.2\workspace\blink>

And I donot have any clue how to solve this. Any Assist would be helpful.

Thanks
Anurag

Anurag Paul
Posts: 11
Joined: Thu Jul 14, 2022 5:07 am

Re: ESP32 Debugging using openOCD

Postby Anurag Paul » Thu Jul 28, 2022 12:33 pm

Hi I solved this problem by erasing my esp32 using jtag and then running the command <openocd -f board/esp32-wrover-kit-3.3v.cfg> again.

But this time I get this target esp32.cpu1 examination failed and esp32.cpu0: Debug controller was resets every time.
Any assist will be helpful.



C:\Espressif\frameworks\esp-idf-v4.2>openocd -f board/esp32-wrover-kit-3.3v.cfg
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
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
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : ftdi: if you experience problems at higher adapter clocks, try the comman
d "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 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)
Warn : target esp32.cpu1 examination failed
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : starting gdb server for esp32.cpu0 on 3333
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.

Who is online

Users browsing this forum: No registered users and 242 guests