ESP32 + J-link debugger does not start

Can you show a screenshot of zadig on which device you are changing the driver? Are there any other JLink related devices in the list or device manager?

Hi Max, So kind of you to respond.

I described my jlink/platformIO/openOCD process with screenshots. Sadly I’m limited to one screenshot, so I put it all in this document.

Is this the particular bit you wanted to see?

I select the BULK interface and update it.
2020-02-03_120504

Mik

Well I’m kinda lost but it should have worked. Once you have repalced the drivers with WinUSB, you aren’t able to use the normal JLink tools until the driver is uninstalled again, right? Otherwise the driver wasn’t properly replaced.

This link (Error while flashing SoftDevice - J-Link EDU · Issue #228 · sandeepmistry/arduino-nRF5 · GitHub) says it was solved by reinstalling JLink drivers and then using Zadig again with WinUSB, and that the Bulk interface is the right one to replace. This thread ([OpenOCD-user] JLink works on 0.4.0, but not on 0.6.1 | OpenOCD - Open On-Chip Debugger) says that libusb-win32 drivers may also work.

1 Like

Thanks again.

Drivers uninstalled and Zadiq’d many times, in may different combos. I’ve tried all the library combos too.

I’m totally sure the hookup is correct.

However, I’m on the track of something else now.
J-LINK — PlatformIO latest documentation says that this is the setup for JLink:

debug_tool = jlink

; JTAG interface
upload_protocol = jlink-jtag

I found that it was choking on the jlink_jtag word.

Just below it says this:

  1. Start debugging session using PlatformIO IDE. PlatformIO will install J-Link software dependencies
  2. Navigate to [core_dir]/packages/tool-jlink/USBDriver
  3. Run InstDrivers.exe .

Im my case, no such directory exists, and clearly no such install has occurred. The specified directory has no JLink stuff in it whatsoever. So my challenge now is to find out why.

1 Like

Hi Mik,
I see you tried a lot of options to get it working. I would try to change the frequency reasonable numbers. 20 kHz may be too slow for some reason (maybe some timeout would occur). Go to 1000 kHz, I was running on 5000 kHz fine with some 10 cm long cables.

In the meantime, I am not using the J-link anymore, I switched to ESP-prog. Anyway the Zadig procedure was very similar. There are 2 interfaces, and only one needs to be replaced (for my case it was Interface 0). This may be bit different on J-link (I don’t remember this detail anymore).

Pictuse how it looks like for ESP-prog, it works in this state:

Also keep in mind that Windows sometimes forgets the driver replacement, so check again in zadig if it is replaced correctly. This also happens I use different USB port.

Another thing possibly is that you may need to update FW in your J-link.

Good luck with debugging, I hope you will make it work!

1 Like

Yourigh,
Thank you so much for your response, and the useful screen shots. . (5th day on this now) Yup, refreshed FW in jlink, I tried all the options you mention but to be sure I just ran through a bunch of speeds again, hunting around at various kHz. I should mention that I can get it to work under eclipse.

I’m pretty sure that there is some configuration issue - see my previous post. But I can’t seem to find the documentation that explains how to integrate SEGGER JTAG software components into the platfromio tree. The automagic install that they say happens, simply does not for me.

Apparently if I want some professional help I have to ante up $150.

It would be a lot less expensive for me to simply order an ESP-Prog and start over.

Thanks again. If I discover a fix, I’ll post the solution for sure.

Mik

A few notes regarding J-Link and ESP32:

Warn : Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED.

If this error message occurs (and not other LIBUSB message), OpenOCD cannot talk to the J-Link debug probe: either the wrong driver has been installed or the USB device is somehow blocked. For a J’Link V9 it should look like this:

For version V8, it says “JLink” instead of “BULK interface (Interface 2)”. I also recommend to unplug and replug both the J-Link and the ESP32 board.

If no LIBUSB_ERROR_xxx message occurs but instead it says:

Error: JTAG scan chain interrogation failed: all ones

Then it is more likely that the wiring between the JLink and the ESP32 board is problematic (pins swapped, debug pins used for other purposes). Check the wiring and unplug and replug the MCU board.

2 Likes