3 Here's a step by step from a clean install to successfully setup MinGW and build
4 libusb-1.0 and stlink for MS Windows. Hopefully this helps someone.
6 1. Install MinGW and MSYS to C:\MinGW with the graphical installer from
7 http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download
8 and add these packages:
10 mingw-developer-toolkit
12 2. Add C:\MinGW\bin to your path.
13 Note: a user reports she had to use c:\MinGW\msys\1.0\bin
15 3. Create the C:\MinGW\msys\1.0\etc\fstab file to mount C:\MinGW as /mingw as per
16 http://www.mingw.org/wiki/MSYS:
18 #Win32_Path Mount_Point
21 4. Download these three glib, pkg-config, pkg-config-dev archives and extract
23 http://win32builder.gnome.org/packages/3.6/glib_2.34.3-1_win32.zip
24 http://win32builder.gnome.org/packages/3.6/pkg-config_0.28-1_win32.zip
25 http://win32builder.gnome.org/packages/3.6/pkg-config-dev_0.28-1_win32.zip
27 5. Download latest libusb-1.0 source from
28 https://github.com/libusb/libusb (newer repo, includes USB 3.0 hub support)
29 OR the old git://git.libusb.org/libusb.git (original repo, NO USB 3.0 support)
30 and build (prefix as per http://www.mingw.org/wiki/MSYS)
33 ./configure --prefix=/mingw
37 6. Repeat for stlink source from https://github.com/texane/stlink
40 ./configure --prefix=/mingw
44 7. Enjoy the fruits of the stlink developers.