Unable to build openocd on Windows: libusb not found
Posted: Fri Jun 18, 2021 8:40 pm
Hello
I have been trying to build a current version of openocd on Windows using the instructions here
https://docs.espressif.com/projects/esp ... ndows.html
I have tried it multiple times but I fail with
configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices
even though I downloaded and unzipped libusb-1.x as per the instructions and when I ls I see it is were I think it should be
$ echo $CPPFLAGS
-I/c/Users/bjpic/esp/libusb/include/libusb-1.0 -D__USE_MINGW_ANSI_STDIO=1 -Wno-error
bjpic@LAPTOP-70Q5CT1Q MSYS ~/esp
$ echo $LDFLAGS
-L/c/Users/bjpic/esp/libusb/MinGW32/.libs/dll
bjpic@LAPTOP-70Q5CT1Q MSYS ~/esp
$ ls
buildsetup.bat config.bat examples install.bat libusb-1.0.22.7z openocd-esp32 sdkconfig.ci
CMakeLists.txt example_test.py export.bat **libusb** Makefile README.md sdkconfig.defaults
Because configure fails I cannot run make. If I run configure without the options (i.e. --disable-doxygen-pdf --enable-ftdi --enable-jlink --enable-ulink --build=i686-w64-mingw32 --host=i686-w64-mingw32) It give me errors because libusb is not found.
I have attached a fill trace of the problem.
I am trying to build the most recent version of openocd because when I try to run it as per https://docs.espressif.com/projects/esp ... ing-target
I get the following
C:\Users\bjpic\Desktop\esp-idf>openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
force hard breakpoints
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : Listening on port 3333 for gdb connections
Note the **Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED**
This occurs even though I have tried all the permutations of drivers for the USB port.
Thank you
I have been trying to build a current version of openocd on Windows using the instructions here
https://docs.espressif.com/projects/esp ... ndows.html
I have tried it multiple times but I fail with
configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices
even though I downloaded and unzipped libusb-1.x as per the instructions and when I ls I see it is were I think it should be
$ echo $CPPFLAGS
-I/c/Users/bjpic/esp/libusb/include/libusb-1.0 -D__USE_MINGW_ANSI_STDIO=1 -Wno-error
bjpic@LAPTOP-70Q5CT1Q MSYS ~/esp
$ echo $LDFLAGS
-L/c/Users/bjpic/esp/libusb/MinGW32/.libs/dll
bjpic@LAPTOP-70Q5CT1Q MSYS ~/esp
$ ls
buildsetup.bat config.bat examples install.bat libusb-1.0.22.7z openocd-esp32 sdkconfig.ci
CMakeLists.txt example_test.py export.bat **libusb** Makefile README.md sdkconfig.defaults
Because configure fails I cannot run make. If I run configure without the options (i.e. --disable-doxygen-pdf --enable-ftdi --enable-jlink --enable-ulink --build=i686-w64-mingw32 --host=i686-w64-mingw32) It give me errors because libusb is not found.
I have attached a fill trace of the problem.
I am trying to build the most recent version of openocd because when I try to run it as per https://docs.espressif.com/projects/esp ... ing-target
I get the following
C:\Users\bjpic\Desktop\esp-idf>openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
force hard breakpoints
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : Listening on port 3333 for gdb connections
Note the **Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED**
This occurs even though I have tried all the permutations of drivers for the USB port.
Thank you