Welcome, Guest

Author Topic: JTAG JLINK debugger connection problem ESP32-EVB  (Read 578 times)

asl07

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
JTAG JLINK debugger connection problem ESP32-EVB
« on: March 27, 2019, 11:44:35 AM »
Hi,

I am trying to use JTAG debugger with the ESP32-EVB.

I have followed the instructions for connection in this post https://www.olimex.com/forum/index.php?topic=6039.0
and also the espressif tutorial here https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/jtag-debugging/index.html#jtag-debugging-configuring-esp32-target

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

Open On-Chip Debugger  v0.10.0-esp32-20190313 (2019-03-13-09:59)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()

Can you help troubleshooting this.

Thanks


LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1968
  • Karma: +50/-3
Re: JTAG JLINK debugger connection problem ESP32-EVB
« Reply #1 on: March 27, 2019, 11:52:31 AM »
Quote
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

OpenOCD can't find your JTAG tool. Probably either the drivers for the JTAG tool are improper or the CFG file that you use for it is not properly fitting.

If you disconnect your JTAG tool from the computer and run the same script (e.g. no JTAG or ESP32 hardware attached to the computer), you should get the same error.
Technical support and documentation manager at Olimex

asl07

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: JTAG JLINK debugger connection problem ESP32-EVB
« Reply #2 on: April 24, 2019, 12:02:51 PM »
Hi,

Thanks and sorry for the late reply, I hadn't seen your message. I am using the right config now apparently but this is what I get.
I have tried to run the command with jlink config file bin/openocd -s share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
My Jlink drivers are installed properly, I am able to use it with other devices (eg. Nordic NRF52)

bin/openocd -s share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger v0.10.0-esp32-20190313 (2019-03-13-09:59)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V9 compiled Oct 25 2018 11:46:07
Info : Hardware version: 9.40
Info : VTarget = 3.354 V
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Listening on port 3333 for gdb connections

Have been researching about it but I am not able to get it solved

Thanks

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1968
  • Karma: +50/-3
Re: JTAG JLINK debugger connection problem ESP32-EVB
« Reply #3 on: April 24, 2019, 01:03:07 PM »
This time the debugger seems to be properly recognized and it is likely an issue with the hardware connection or the multiplexing of the JTAG pins. First double check the powering and the data wires. Then if these are as they should consider that the pins are also used for the SD card, you need to make sure any code and libraries related to SD card are not programmed to the board, else this screws any JTAG connection. Of course, also make sure that SD card is not inserted.

I'd also recommend checking and/or posting in the espressif forums, there seems to be a lot of experience shared with similar errors.
Technical support and documentation manager at Olimex

asl07

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: JTAG JLINK debugger connection problem ESP32-EVB
« Reply #4 on: April 25, 2019, 11:10:25 AM »
Hi,

Thanks. The Vref cable was missing.
It's working now.

Regards