OpenOCD - No Device Found

I am getting the following error trying to use an ESP-PROG with a n ESP32 project. I had this working fine for quite a while but it isn’t working now.

Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus location '*'
** OpenOCD init failed **

I have done the following:

  • Deleted the tools-openocd-ESP32 package directory and had PlatformIO reinstall (package.json says it is the latest level)
  • Ran: pio system prune --force
  • Uninstalled and reinstalled the espressif32 platform
  • Used zadig to assure RS232-HS (Interface 0) is using winusb.sys
  • repowered the target hardware and replugged the USB cable to the ESP-PROG
  • Reboot my Win10 AMD64 system
  • Verified the VID/PID in the error message is the same as in Device manager
  • Tried to find the source of " description ’ ’, serial ‘’ at bus location ’ ’ as part of the startup command but it is a mystery (and seems to be the heart of this problem!)

The relevant (and previously working) part of my platofrmio.ini is:

upload_protocol = esp-prog
upload_speed = 921600
debug_tool = esp-prog
debug_speed = 5000
debug_init_break = tbreak setup

Note that I have had this working before (both uploading and debugging) and, for another problem (BlueToothSerial linker errors) I had updated the Espressif 32 platform to v 6.8.1, and ( I think) this problem started.

Any advice on how I can fix this and get back to work?!

Screenshot of Zadig with the RS232-HS (Interface 0) device selected?

image

image

I don’t think this is necessarily related but I removed the ESP-PROG lines from my platformio.ini and loaded via USB. I am now getting this error:

Wrote 1639376 bytes (1059229 compressed) 
at 0x00010000 in 26.6 seconds (effective 
492.2 kbit/s)...
File  md5: 86cea89ac042b76c7974510c5029d8c2
Flash md5: 15068c6d2285a046f597c684bd0e4e0d
MD5 of 0xFF is 9d196fcef01f02063cbeca06313a729d

A fatal error occurred: MD5 of file does 
not match data in flash!

Note: I had to use a partitions.csv file (as below) to get the full 4MB of flash to be recognized.

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  factory, 0x10000, 0x3A0000,
eeprom,   data, 0x99,    0x3B0000,0x1000,
spiffs,   data, spiffs,  0x3B1000,0x4F000,

And what happens when you don’t use that file?

Without the partitions.csv file, I exceed the 1MB of Flash size and can’t go from there. I did get the USB loading to work (totally erase Flash with esptool, used the boot and EN button, etc.) and that now works.

So I am back to the original problem of not having my ESP-PROG be found as per the first part of this thread.

This is the error message:

Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus 
location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '*', serial '*' at bus 
location '*'
** OpenOCD init failed **

zadig shows that the driver is WinUSB:
image

I also put a brand new ESP-PROG in and have the same error.

For reference, here is a verbose output. I am trying to find the openOCD call that PlatformIO is making but it isn’t here. Why is it looking for an FTDI devicewith vid 0403, pid 6010, description ‘', serial '’ at bus location ‘*’

PS C:\PIO\Projects\BM2> pio run -v
Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino; board_build.partitions: data/partitions.csv; monitor_speed: 
115200; lib_deps: ttlappalainen/NMEA2000-library@^4.21.5, ttlappalainen/NMEA2000_esp32@^1.0.3, contrem/arduino-timer@^3.0.1, pedroalbuquerque/ESP32WebServer@^1.0; upload_protocol: esp-prog; upload_speed: 921600; debug_tool: esp-prog; debug_speed: 5000; debug_init_break: tbreak setup)
-----------------------------------------------CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.8.1) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash   
DEBUG: Current (esp-prog) External (cmsis-dap, 
esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)

Then create a new project and open a blinky sketch. We need less changing variables, not more. The baseline esptoolpy serial upload should work with your board in the most simplest case, no need to go on if that’s not working.

I totally uninstalled and reinstalled PlatformIO. I’m also using a simple blink sketch. I can upload code via USB.

So now back to the same problem in that I am unable to use an ESP-PROG. I continue to get this error despite having used zadig to set up RS-232-HS (Interface 0) to the WinUSB driver.
image

Device manager looks OK:
image

I have tried a brand new ESP-PROG with the same results, i.e. this is the error message:

Open On-Chip Debugger v0.11.0-esp32-20220706 (2022-07-06-15:48)
debug_level: 1
adapter speed: 20000 kHz
adapter speed: 5000 kHz

Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description ‘', serial '’ at bus location ‘
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6014, description '
’, serial ‘’ at bus location '
** OpenOCD init failed **
shutdown command invoked

Here is my platformio.ini (same as I have been using all along when this was working):
[env:esp32dev]

platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_protocol = esp-prog
upload_speed = 921600
debug_tool = esp-prog
debug_speed = 5000
debug_init_break = tbreak setup

One other thing I tried was to uninstall the RS232-HS (interface 0) in Device Manager and also delete the driver software for it (using the checkbox for that). It reinstalled as libusb0 which I again changed to WinUSB and I get the same error.

Is this text in the error message a problem (maybe with the wildcards):
description '', serial '’ at bus location ''***

What can I do to fix this?!

EDIT— more information:
-since the above post I have tried other things, still no joy, however:

  • Uninstalled both USB-PROG devices in Device Manager, reinstalled the latest FTDI drivers, and used zadig to change change RS232-HS (Interface 0) to WinUSB.

  • Totally shutdown my machine and unpowered the USB hub I am using, plus tried a different USB cable and even a brand new ESP-PROG

  • Recalled that at one time I have 2 packages\tool-openOCD directories in my .platformio directory. One was tool-openocd and the other as now tool-openocd-esp32. I tried with one or the other or both and the error persisted. When I tried to uninstall tool-openocd-esp32 it said it was removed but the directory remained. I deleted it manually. When I tried to upload ir was reinstalled but the error persists.

  • Tried reducing the upload and debug speeds in platformio.ini, still the error.

  • unplugged USB from the ESP-PROG - same error!!

  • Plugged ESP-PROG into computer USB (instead of powered hub). Changed via zadig to WinUSB driver. Now getting error one would get before changing to winUSB driver (but I verified it has been changed plus uninstalled and did FTDI install and zadig again!):

Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
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 0x1f not 0x01

My development work has essentially stopped because I cannot get this to work. Does anyone have any ideas for me?

Max - I am seeing email notifications of a change on this thread but I can’t see any of your responses if you are making them. Please let me know.

This looks better than before in the sense that it has opened the adapter this time but just couldn’t connect to the ESP32 via JTAG.

Use the exact wiring as in https://medium.com/@manuel.bl/low-cost-esp32-in-circuit-debugging-dbbee39e508b. Lower debug_speed as needed. Start by debugging a blinky sketch, not your actual code.

Thanks for the reply, Max.

I have been working with a blink program for a long time and much water has passed under the bridge. Basically, I have totally reinstalled PlatformIO, did a Registry clean of all FTDI VID_0403&PID_6010, RS-232-HS and (applicable) winusb entries, tried different USB ports and cables and even a new ESP-PROG. I also ran the FTDI CDM Uninstaller. I have tried 3 of my custom boards which clearly have the JTAG signals wired correctly. (Note: I had this all working previously). I reinstalled the FTDI drivers and set back to WinUSB. Verified this in Device Manager.

After all of that I still had the problem even with the last USB (3.0) port I tried to which you responded about. The ESP-PROG was not found or I got the LIBUSB not supported error and couldn’t change it.

I plugged into a standard USB2.0 port (motherboard port) and changed to winUSB (verified in Device Manager and zadig). Interestingly, I still get the LIBUSB not supported error but code was uploaded (Ctrl-F5) and the blinking started. I assume this was via RS232-HS (interface 1) which shows up as a COM port (has FTDI drivers and is for VID_0403&PID_6010 which is the ESP-PROG)

I went back to my large program and the debugger works there as well.

So, for now the problem is solved, BUT I don’t know why!!! There is a corollary to Murphy’s law or some other law of development where “a problem “fixed” whose root cause is unknown… will be back!!” The fact I still see this line in the output is troubling:
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED when both zadig and Device Manager say winUSB.

1 Like

Reopen if it fails again.

Reopening. As I said without knowing a root cause problems come back. This one did!

I have done everything I could possibly think of including a deep clean of the Registry. This included completely eliminating all FTDI and winsys drivers from my system and reinstalling. I had also totally reinstalled PlatformIO

The frustrating part is once I moved to a motherboard based USB2.0 USB port the error is one where “LIBUSB is not supported” but even after using Zadig this error persisted and it still wouldn’t work consistently. I say consistently since it work a few times and the problem with the LIBUSB not supported error reappears…