Error LIBUSB_ERROR_IO with VisualGDB debugger

by Pratik (A PCBArtist)

The PCBArtists VisualGDB Debug Adapter can be used with a bunch of different embedded platforms, including STM32 and ESP32.
The adapter allows you to debug and flash the target platforms using SWD interface or UART, whiever is supported.

If you have not installed proper drivers, you will face issues with VisualGDB recognizing the debug adapter properly.

Error: failed to reset FTDI device: LIBUSB_ERROR_IO

Open On-Chip Debugger 0.9.0-rc1 (2015-04-24-22:09)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
none separate
cortex_m reset_config sysresetreq
Error: failed to reset FTDI device: LIBUSB_ERROR_IO
Error: unable to open ftdi device with vid 0403, pid 6010, description 'PCBArtists Debug Adapter' and serial '*'

An error like this means that you have probably installed “libusb” driver for the FT2232 debug adapter. You need to replace that driver with “WinUSB driver” to allow VisualGDB to open and access the debug adapter port.

Fix the FT2232 driver on Windows

The interface 0 of FT2232 acts as the SWD interface in case of our adapter. Yours might be different and you should check before proceeding.

The first step is to download Zadig from here. Zadig can be downloaded as a stanndalone EXE file and does not need extraction or installation before running.

Once done, run the tool with admin permission and check
Options > List All Devices

From the drop-down, select
Dual RS232-HS (Interface 0)

Zadig install winusb driver visualgdb ft2232 adapter

Click Replace Driver to install the WinUSB driver.

Test the new driver

Leave a Comment

one + 14 =