picotool icon indicating copy to clipboard operation
picotool copied to clipboard

Cannot build on windows with libusb

Open JohnAZoidberg opened this issue 6 months ago • 4 comments

I tried to do it myself and then I noticed the GitHub action CI also can't do it:

-- Could NOT find LIBUSB (missing: LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) 
libUSB is not found - no USB support will be built

In the run of "Build & Test (windows-latest, Ninja, mbedtls, libusb, compile)"

JohnAZoidberg avatar Jul 10 '25 15:07 JohnAZoidberg

Well that's unexpected! @will-v-pi I guess the CI-test should check that in the libusb-included builds, the picotool help output lists the load command as being available?

lurch avatar Jul 11 '25 07:07 lurch

What version of libusb are you downloading, and did you definitely set the LIBUSB_ROOT environment variable, or pass -DLIBUSB_ROOT=/path/to/libusb to CMake?

I've just tested with the latest (https://github.com/libusb/libusb/releases/download/v1.0.29/libusb-1.0.29.7z) and it's working fine for me - the issue with the action was not setting the environment variable correctly, which I'm fixing now

will-v-pi avatar Jul 15 '25 13:07 will-v-pi

Thanks, I'll try it again.

Could you have the github actions upload the windows binary - then we could easily get the latest build.

JohnAZoidberg avatar Aug 27 '25 08:08 JohnAZoidberg

If you're unable to build picotool yourself, I believe the recommendation is to download it from https://github.com/raspberrypi/pico-sdk-tools/releases

lurch avatar Aug 27 '25 08:08 lurch