Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND (IDFGH-9317) (OCD-709) #270

Closed
3 tasks done
Zeni241 opened this issue Feb 4, 2023 · 6 comments
Closed
3 tasks done

Comments

@Zeni241
Copy link

Zeni241 commented Feb 4, 2023

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I have custom installation of esp-idf in folder d:\espidf and toolchain in d:\espidfTchain in Windows 10.
Everything works fine except openocd.
I get the following error:

Open On-Chip Debugger v0.11.0-esp32-20221026 (2022-10-26-14:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!
Error: Unsupported xlen: -1
Error: Unknown target arch!

Getting some hint from here where it is mentioned:

To use binaries build locally from sources, change the path to OpenOCD executable to src/openocd and set the OPENOCD_SCRIPTS environment variable so that OpenOCD can find the configuration files. For Linux and macOS:

For Windows:
cd %USERPROFILE%\esp\openocd-esp32
set "OPENOCD_SCRIPTS=%CD%\tcl"
Example of invoking OpenOCD build locally from sources,
Windows:
src\openocd -f board/esp32c3-builtin.cfg_

What should be the paths in my case in commands

cd %USERPROFILE%\esp\openocd-esp32
set "OPENOCD_SCRIPTS=%CD%\tcl"
and
src\openocd -f board/esp32c3-builtin.cfg

@github-actions github-actions bot changed the title Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND (IDFGH-9317) Feb 4, 2023
@igrr igrr transferred this issue from espressif/esp-idf Feb 4, 2023
@github-actions github-actions bot changed the title Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND (IDFGH-9317) Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND (IDFGH-9317) (OCD-709) Feb 4, 2023
@erhankur
Copy link
Collaborator

erhankur commented Feb 6, 2023

@erhankur
Copy link
Collaborator

@Zeni241 Closing this one. You can reopen it if you have any other issues. Also please check previous driver issues. You will find something helpful for you.

@torkleyy
Copy link

torkleyy commented Sep 7, 2023

I had to follow this guide to get it to work:

https://community.platformio.org/t/esp32-pio-unified-debugger/4541/20

@Tomblarom
Copy link

Tomblarom commented Mar 7, 2024

@torkleyy Yes that solved it dor me! Thanks :) NOTE: zadiag had to be executed as admin!
image

@SpaceCheetah
Copy link

Following that guide just led to it not working at all, had to roll back to the windows ones. With those, I can flash with idf.py flash, but OpenOCD fails with error not found.

@yamaan93
Copy link

yamaan93 commented Oct 2, 2024

is there no fix to this? the zadiag solution is only for chips without an on-chip debugger.....I'm also encountering this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants