Page 1 of 1

OpenOCD can't detect ESP32 devKit C on Windows

Posted: Fri Jun 15, 2018 5:36 pm
by turkeylegs
I used this guide to set up OpenOCD and JTAG on windows:

https://esp-idf.readthedocs.io/en/lates ... debugging/

Right now I'm using a J-link edu mini, using an SWD cable and this SWD break-out:
https://www.adafruit.com/product/2743


Using this image https://www.segger.com/fileadmin/images ... dapter.png
this is how I hooked it up (format is j-link - SWD Breakout - Devkit C):

VTref - Vref - 3V3
GND - GND - GND
TMS - SWIO - IO14
TCK - CLK - IO13
TDO - SWO - IO15
TDI - NC - IO12

I installed the j-link drivers, and I can see the j-link in Device Manager.

When I get to the part where I need to run:

Code: Select all

bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
I get this:

Code: Select all

$ bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
What might be causing this? Is everything connected correctly? What can I do to troubleshoot?

Also, I've tried both using a battery connection as well as plugging the devkit c in using usb. Which is the "proper" way to debug?

Thanks in advance!

Re: OpenOCD can't detect ESP32 devKit C on Windows

Posted: Sat Jun 16, 2018 2:27 am
by ESP_igrr
First, you need to specify the correct interface file (jlink instead of ftdi/esp32_devkitj...). Second you have not connected TDI, which is required for JTAG to work. ESP32 does not have SWD, you need to connect all of MTDI,MTDO,MTCK,MTMS pins of the ESP32 to the JTAG adapter.

Re: OpenOCD can't detect ESP32 devKit C on Windows

Posted: Mon Jun 18, 2018 3:59 pm
by turkeylegs
ESP_igrr wrote:First, you need to specify the correct interface file (jlink instead of ftdi/esp32_devkitj...). Second you have not connected TDI, which is required for JTAG to work. ESP32 does not have SWD, you need to connect all of MTDI,MTDO,MTCK,MTMS pins of the ESP32 to the JTAG adapter.
I'm aware ESP32 doesn't have esp32, I'm just using SWD breakout for the smaller footprint. The jlink edu mini uses an SWD connector. TDI is connected to GPIO 12, which is labelled "NC" on the SWD breakout.

I tried using this instead:

Code: Select all

bin/openocd -s share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
and got this.

Code: Select all

Open On-Chip Debugger 0.10.0-dev (2018-06-04-09:51)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
esp32 interrupt mask on
force hard breakpoints
jaylink: Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED.
Info : No device selected, using first device.
Error: No J-Link device found.
Error's a little different; what's going on?