I sucessfully compiled openocd / picotool with msys2 on Windows 10. But I always got a "Segmentation fault" whenever I tried to access a pico device. After some testing it seems the problem comes from libusb version 1.0.24 that gets installed via pacman. Using a manually downloaded version 1.0.23 fixes the problem for me. Luckily msys2 still has the older version in it's repo. AFAIK pacman does not support choosing an older version to install, so download the older package first and install it from file:
Code: Select all
$ wget http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libusb-1.0.23-1-any.pkg.tar.xz
$ pacman -U mingw-w64-x86_64-libusb-1.0.23-1-any.pkg.tar.xz
Unfortunately the next time packages are updated with
pacman -Su libusb gets updated again to 1.0.24.
I just opened an issue with raspberrypi/openocd:
https://github.com/raspberrypi/openocd/issues/20