Align loader to 32-bit boundary
[fw/stlink] / INSTALL.mingw
1 from dandev37:
2
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.
5
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:
9 mingw32-base
10 mingw-developer-toolkit
11
12 2. Add C:\MinGW\bin to your path.
13 Note: a user reports she had to use c:\MinGW\msys\1.0\bin
14
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:
17
18 #Win32_Path     Mount_Point
19 c:/mingw        /mingw
20
21 4. Download these three glib, pkg-config, pkg-config-dev archives and extract
22 contents to C:\MinGW
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
26
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)
31
32 ./autogen.sh
33 ./configure --prefix=/mingw
34 make
35 make install
36
37 6. Repeat for stlink source from https://github.com/texane/stlink
38
39 ./autogen.sh
40 ./configure --prefix=/mingw
41 make
42 make install
43
44 7. Enjoy the fruits of the stlink developers.