Added support for NXP LPC1850 Microcontroller
[openocd.git] / README.Win32
blob6c690c9cdcb3a4a2527353355b9ae7e4b315f551
1 Building OpenOCD for Windows
2 ----------------------------
4 For building on Windows, you have to use CygWin. Make sure that your
5 PATH environment variable contains no other locations with Unix utilities
6 (like UnxUtils).  Those tools can't handle the CygWin paths, resulting
7 in obscure dependency errors.  This was an observation gathered from the
8 logs of one user; please correct us if this is wrong.
10 The following URL is a good reference if you want to build OpenOCD
11 under CygWin:
13         http://forum.sparkfun.com/viewtopic.php?t=11221
15 Alternatively you can build the Windows binary under Linux using
16 MinGW cross compiler. The following documents some tips of
17 using this cross build option.
19 libusb-win32
20 ------------
22 You can choose to use the libusb-win32 binary distribution from
23 its SourceForge page. As of this writing, the latest version
24 is 0.1.12.2. This is the recommend version to use since it fixed
25 an issue with USB composite device and this is important for FTDI
26 based JTAG debuggers.
28         http://sourceforge.net/projects/libusb-win32/
30 You need to download the libusb-win32-device-bin-0.1.12.2.tar.gz
31 package.  Extract this file into a temp directory.
33 Copy the file libusb-win32-device-bin-0.1.12.2\include\usb.h
34 to your MinGW include directory.
36 Copy the library libusb-win32-device-bin-0.1.12.2\lib\gcc\libusb.a
37 to your MinGW library directory.
39 Take note that different Linux distributions often have different MinGW
40 installation directory.  Some of them also put the library and include
41 into a separate sys-root directory.
43 When the libusb-win32 repository is more current than its release code,
44 you could build that instead.
46 These are the instruction from the libusb-win32 Makefile:
48 # If you're cross-compiling and your mingw32 tools are called
49 # i586-mingw32msvc-gcc and so on, then you can compile libusb-win32
50 # by running
51 #    make host_prefix=i586-mingw32msvc all
53 libftdi
54 -------
56 The author does not provide Windows binary. You can build it from a
57 released source tarball or the git tree.
59 If you are using the git tree, the following are the instructions from
60 README.mingw. You will need to have the cmake utility installed.
62 - Edit Toolchain-mingw32.cmake to point to the correct MinGW
63   installation.
64 - Create a build directory like "mkdir build-win32", e.g in ../libftdi/
65 - cd into that directory and run
66   "cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain-mingw32.cmake .."
67 - Copy src/ftdi.h to your MinGW include directory.
68 - Copy build-win32/src/*.a to your MinGW lib directory.
70 libftd2xx
71 ---------
73 The Cygwin/Win32 ZIP file contains a directory named ftd2xx.win32.
74 After being extracted, the directory does not need further preparation.
75 Instead, its path must be provided to the --with-ftd2xx-win32-zipdir
76 configure option, as shown in the next section.
78 OpenOCD
79 -------
81 Now you can build OpenOCD under Linux using MinGW.  You need to use
82 --build and --host configure options.
84 To use libftdi:
86   ./configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc \
87         --enable-ft2232_libftdi \
88         ... other options ...
90 To use ftd2xx:
92   ./configure --build=i686-pc-linux-gnu --host=i586-mingw32msvc \
93         --enable-ft2232_ftd2xx \
94         --with-ftd2xx-win32-zipdir=/path/to/libftd2xx-win32 \
95         ... other options ...
97 If you are using the GIT repository, see the README file for additional
98 instructions about configuring and building OpenOCD.