Error: unable to open ftdi device with description '*', serial '*' at bus location '*'

[2024-08-07T14:29:21.966Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Users\\{user}\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\openocd-esp32\\v0.12.0-esp32-20240318/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\\Users\\{user}\\Documents\\Arduino\\first_test" -f "C:/Users/{user}/AppData/Local/Programs/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f board/esp32-wrover-kit-3.3v.cfg
Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Error: unable to open ftdi device with description '*', serial '*' at bus location '*'
C:/Users/{user}/AppData/Local/Arduino15/packages/esp32/tools/openocd-esp32/v0.12.0-esp32-20240318/bin/../share/openocd/scripts/target/esp_common.cfg:9: Error: 
at file "C:/Users/{user}/AppData/Local/Arduino15/packages/esp32/tools/openocd-esp32/v0.12.0-esp32-20240318/bin/../share/openocd/scripts/target/esp_common.cfg", line 9
[2024-08-07T14:29:22.121Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

I have made sure that the ESP-32 chip is connected to my computer via Device Manager (and have the correct drivers installed) and tried redownloading Arduino IDE, but none have helped yet so far. Line 9 mentioned in the error message above is "catch {[source [find target/esp_version.cfg]]}". Please advise on next course of action. Thank you!

Welcome to the forum penguin_man72!

Could you describe what you are doing and the steps you took to arrive at this error message please?

1 Like

Hi @penguin_man72. Do you have a suitable hardware debug probe connected between your computer and the JTAG pins on the ESP32 board?

An example of such a probe is Espressif's "ESP-Prog":

https://docs.espressif.com/projects/esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html

It is mandatory to have a hardware debug probe in order to use the Arduino IDE 2.x integrated sketch debugger with an ESP32 board. You can't use the sketch debugger if you only have the ESP32 board connected to your computer with a USB cable as usual.

Hi @penguin_man72,

welcome to the arduino-forum.

From your error-messages you seem to have activated hardware-debugging.
But you did not write anything if you really want to do this.
From this thread beeing your very first thread I assume you are a beginner.

So maybe you are just trying to upload some code and that's it.
Regardless of beeing a beginner or not you should post much more detail-information what your setup is and what you try to do.

In case you are a beginner

I'm pretty sure that you agree and will follow the way how to solve your problem mimimum 200 minutes faster.
This requires to invest 20 minutes of your precious time to read how to speedup solving your problems.

Directly after registering you got presented informations how to speed up solving your problem.
You should really read it.

best regards Stefan

[2024-08-07T20:57:05.639Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
"C:\\Users\\yxtia\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\openocd-esp32\\v0.12.0-esp32-20240318/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "c:\\Users\\yxtia\\Documents\\Arduino\\first_test" -f "C:/Users/yxtia/AppData/Local/Programs/Arduino IDE/resources/app/plugins/cortex-debug/extension/support/openocd-helpers.tcl" -f board/esp32-wrover-kit-3.3v.cfg
Open On-Chip Debugger v0.12.0-esp32-20240318 (2024-03-18-18:26)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Error: unable to open ftdi device with description '*', serial '*' at bus location '*'

[2024-08-07T20:57:05.797Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...

I don't have a suitable hardware debug probe. Thank you for the information!

OK, so you must not click the "Start Debugging" button on the Arduino IDE toolbar:

image

You can of course still use the "Verify" button when you want to compile the sketch, and the "Upload" button when you want to upload the sketch to the board.

As an alternative to the Arduino IDE 2.x integrated sketch debugger, you can fall back on our old trusty technique of using Serial Monitor to debug the code. Just add Serial.print calls to strategic locations in your sketch code, printing relevant information, upload the updated sketch to the board, open Serial Monitor, then watch the output printed in Serial Monitor to get an understanding of what it happening in the program. There are some limitations to this approach when compared to using a debug probe, but the Arduino community and embedded systems engineers in general have used it quite successfully for decades.

If you do want to use the sketch debugger, you can either buy an ESP-Prog probe, or buy one of the boards that don't require an external probe. The boards that are based on the ESP32-S3 and ESP32-C3 have a built-in debugging support via their USB connection. This includes the official Nano ESP32 board (which uses the ESP32-S3 microcontroller):

https://docs.arduino.cc/tutorials/nano-esp32/debugging/

Good moornig All
I have the same problem, while trying to debug esp32 projecto in Arduino, I'm going to try to explain it:
1.- At the moment to click on init debug:


2.- Version of Arduino IDE 2.3.2
3.- Tools used to debug: esp-prog
4.- I have install last driver from FTTDI (CDM212364_Setup
5.- Using Zadig app, I have change the configuration on interface 1, according to picture below
image
6.- On Administrador de dispositivos, that is the situation then of last step

7.- That is the content of esp_common.cfg at line 9:
catch {[source [find target/esp_version.cfg]]}

and content of esp_version.cfg:

# SPDX-License-Identifier: GPL-2.0-or-later

set EXPECTED_VER "v0.12.0-esp32-20240318"

8.- I have unistall and install CDM21228_setup, and configure Zadig, several times trying to fix problems.
9.- openocd --version
Open On-Chip Debugger 0.11.0
10.- Alsi I haveSelect Tools > Programmer > Esptool from the Arduino IDE menus and selected IDE's Tools > JTAG Adapter menu.
11.- Module board used, esp32 Wroom dev, in Arduino I have selected ESP32 Dev Module.

I hope you have enough information to begin understand my problem, thanks all.

I've managed to solve it!!!!, in my case the folder
C:\Users>user>\AppData\Local\Arduino15\packages\esp32\tools\openocd-esp32\v0.12.0-esp32-20240318\share\openocd\scripts\interface> there is a file called wit this content:
ft232r.cfg

SPDX-License-Identifier: GPL-2.0-or-later

adapter driver ft232r
adapter speed 1000

Investigating it seems that content was missing, so tha is the right way to fix the problems:
ft232r.cfg

SPDX-License-Identifier: GPL-2.0-or-later

#adapter driver ft232r
#adapter speed 1000
interface ftdi
ftdi_vid_pid 0x0403 0x6010
ftdi_channel 0
ftdi_layout_init 0x0038 0x003b
transport select jtag
adapter_khz 200

Anyway I'd like to leave this link, because even though is referred to VSC and platformio, it help me to find the solution:

Regards!

1 Like

Good morning,

I face the same problem when trying to debug ESP32-DEV-Module: "unable to open ftdi device with description '*' ..."

  • I updated to Arduino IDE 2.3.3
  • I use ESP32-DEV-KIT C V4 (with Silicon Labs CP2102)
  • When starting the debugger, "-f board/esp32-wrover-kit-3.3v.cfg" is choosen, while Board "ESP32 DEV Module" is selected in Arduino
  • Programming and downloading works fine
  • Only debugging fails

What makes me wonder: Before I upgraded to Arduino IDE 2.3.3 (maybe with an previous version of ESP32-DEV-KIT, debugging worked fine. Was there a switch in the used debugger???

Replacing the SiliconLabs Driver with the Zadig Tool seems not to be the right way, to solve the problem. Afterwards, the Error Message is the same (ftdi device not found). Don´t know, to switch to WinUSB is necessary???

@fgarmarin I think, I have to find a solution in Your direction ...

  • Did You revert the Zadig-Tool Driver Replacement (FDTI => WinUSB), or is WinUSB mandatory?
  • Is there still the libusb-win32 device in device-manager visible?
  • Where did You find the missing data (adapter speed, layout, etc.) for ft232r.cfg?

I assume, I´ll have to do the same for CP2102 device on ESP32-DEV-KIT C V4

Regards!

Hi @herzitest. Do you have a suitable hardware debug probe connected between your computer and the JTAG pins on the ESP32 board?

An example of such a probe is Espressif's "ESP-Prog":

https://docs.espressif.com/projects/esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html

It is mandatory to have a hardware debug probe in order to use the Arduino IDE 2.x integrated sketch debugger with an ESP32 board. You can't use the sketch debugger if you only have the ESP32 board connected to your computer with a USB cable as usual.

Hello ptillisch,

what makes me wonder: 1-2 years before, I debugged ESP32 with Arduino internal debugger, without problems. Other boards needed at this time additional hardware ...

Question:

  • Was there a change in the used debugger (e.g. from arduino 1.x to 2.x) so that it´s definitely - it will not longer work without external debug probe (even on boards that worked previously)
  • Could it be a driver problem with my new Board (which now has CP2102)

I would like to understand, what has changed principial, so that it does not make sense for me, to experimentate any longer.

Regards.

Were you using this specific ESP32 board? It is true that you can debug the boards that have one of the native USB microcontrollers from the ESP32 family (e.g., ESP32-S3, ESP32-C3) without an external debug probe. However, you can not do that with boards that have the original ESP32 microcontroller such as your "ESP32-DEV-KIT C V4".

This is explained by the ESP32 developer who added the Arduino IDE debugging support here:

https://github.com/espressif/arduino-esp32/pull/7295#issue-1384250786

Currently the following debug methods are supported on all boards (menu option is available for the official "Dev Module" boards):

  • ESP32: FTDI Adapter (ESP-Prog or compatible)
  • ESP32-S2: FTDI Adapter (ESP-Prog or compatible)
  • ESP32-S3: Built-In USB JTAG (Requires proper USB Mode to be selected)
  • ESP32-C3: Built-In USB JTAG

I debugged with older ESP32-DEV-KIT Versions (all with standard ESP32). Single stepping through the code was possible, but it looked different from today gdb (got today my hardware debug probe, and so gdb is running). Was in earlier Arduino IDE versions another debugger integrated?

Anyway, now it´s gdb time. Now I have two USB connected: the USB at ESP32-DEV-KIT (for downloading the code), and in parallel the HW-Debug Probe for debugging. Is my usage so correct?

In Arduino IDE I select the port from ESP32-DEV-KIT, but downloading is only possible, when JTAG cables from HW-Debug Probe are not connected. After downloading, I can connect JTAG cables, and then debug.

I´m shure - thats not intended in this way. Downloading via JTAG?

Regards.

p.s. It seems, the problem does not have to do with HW-Debug probe connected or not. The ESP32-DEV-KIT on my AZ-Touch baseboard does not come in the right boot mode. (Wrong boot mode detected (0xB)!)

When removing ESP32-DEV-KIT from AZ-Touch baseboard, everything is fine. Ugly ...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.