boundarydevices / imx_usb_loader

USB & UART loader for i.MX5/6/7/8 series
GNU Lesser General Public License v2.1
260 stars 158 forks source link

[Windows] libusb_open fails with error code -4 #99

Open Vauteck opened 4 years ago

Vauteck commented 4 years ago

Hello,

I cross-compiled libusb and the imx_usb utility for windows (mingw64 toolchain), but an error occurred as it was trying to open the imx_device after detecting it ( -4 DEVICE_NOT_FOUND ).

I got rid of the problem by commenting out the libusb_free_device_list unref call (right after find_imx_dev). As it's stated in the libusb documentation, "Be careful not to unreference a device you are about to open until after you have opened it."

I'm surprised I'm the only one reporting this, am I missing something ?

Tested on windows 7 64 bit and windows 10 64 bit.