1/* Copyright (c) 2002,2005, Theodore Roth
2   Copyright (c) 2006, Joerg Wunsch
3   Copyright (c) 2007, 2010 Eric B. Weddington
4   All rights reserved.
5
6   Redistribution and use in source and binary forms, with or without
7   modification, are permitted provided that the following conditions are met:
8
9   * Redistributions of source code must retain the above copyright
10     notice, this list of conditions and the following disclaimer.
11   * Redistributions in binary form must reproduce the above copyright
12     notice, this list of conditions and the following disclaimer in
13     the documentation and/or other materials provided with the
14     distribution.
15   * Neither the name of the copyright holders nor the names of
16     contributors may be used to endorse or promote products derived
17     from this software without specific prior written permission.
18
19  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  POSSIBILITY OF SUCH DAMAGE. */
30
31/* $Id: tools-install.dox 2382 2013-05-02 16:09:50Z joerg_wunsch $ */
32
33/**
34
35\page install_tools Building and Installing the GNU Tool Chain
36\addindex installation
37
38This chapter shows how to build and install, from source code, a complete
39development environment for the AVR processors using the GNU toolset. There are
40two main sections, one for Linux, FreeBSD, and other Unix-like operating systems,
41and another section for Windows.
42
43\section install_unix Building and Installing under Linux, FreeBSD, and Others
44
45The default behaviour for most of these tools is to install every thing under
46the \c /usr/local directory.  In order to keep the AVR tools separate from the
47base system, it is usually better to install everything into
48<tt>/usr/local/avr</tt>.  If the \c /usr/local/avr directory does not exist,
49you should create it before trying to install anything.  You will need
50<tt>root</tt> access to install there.  If you don't have root access to the
51system, you can alternatively install in your home directory, for example, in
52<tt>$HOME/local/avr</tt>.  Where you install is a completely arbitrary
53decision, but should be consistent for all the tools.
54
55You specify the installation directory by using the <tt>--prefix=dir</tt>
56option with the \c configure script.  It is important to install all the AVR
57tools in the same directory or some of the tools will not work correctly.  To
58ensure consistency and simplify the discussion, we will use \c $PREFIX to
59refer to whatever directory you wish to install in.  You can set this as an
60environment variable if you wish as such (using a Bourne-like shell):
61
62\addindex $PREFIX
63\addindex --prefix
64\verbatim
65$ PREFIX=$HOME/local/avr
66$ export PREFIX
67\endverbatim
68
69\addindex $PATH
70\anchor path \note Be sure that you have your \c PATH environment variable set
71to search the directory you install everything in \e before you start
72installing anything.  For example, if you use <tt>--prefix=$PREFIX</tt>, you
73must have \c $PREFIX/bin in your exported <tt>PATH</tt>. As such:
74
75\verbatim
76$ PATH=$PATH:$PREFIX/bin
77$ export PATH
78\endverbatim
79
80\warning If you have \c CC set to anything other than \c avr-gcc in your
81environment, this will cause the configure script to fail. It is best to not
82have \c CC set at all.
83
84\note It is usually the best to use the latest released version of
85each of the tools.
86
87\section required_tools Required Tools
88\addindex tools, required
89
90- <b>GNU Binutils</b><br>
91  http://sources.redhat.com/binutils/ <br>
92  \ref install_avr_binutils "Installation"
93
94- <b>GCC</b><br>
95  http://gcc.gnu.org/ <br>
96  \ref install_avr_gcc "Installation"
97
98- <b>AVR LibC</b><br>
99  http://savannah.gnu.org/projects/avr-libc/ <br>
100  \ref install_avr_libc "Installation"<br>
101
102\section optional_tools Optional Tools
103\addindex tools, optional
104
105You can develop programs for AVR devices without the following tools.  They may
106or may not be of use for you.
107
108- <b>AVRDUDE</b><br>
109  http://savannah.nongnu.org/projects/avrdude/ <br>
110  \ref install_avrprog "Installation" <br>
111  \ref using_avrprog "Usage Notes"
112
113- <b>GDB</b><br>
114  http://sources.redhat.com/gdb/ <br>
115  \ref install_gdb "Installation"<br>
116
117- <b>SimulAVR</b><br>
118  http://savannah.gnu.org/projects/simulavr/ <br>
119  \ref install_simulavr "Installation"
120
121- <b>AVaRICE</b><br>
122  http://avarice.sourceforge.net/ <br>
123  \ref install_avarice "Installation"<br>
124
125
126
127\section install_avr_binutils GNU Binutils for the AVR target
128\addindex installation, binutils
129
130The <tt><b>binutils</b></tt> package provides all the low-level utilities
131needed in building and manipulating object files.  Once installed, your
132environment will have an AVR assembler (<tt>avr-as</tt>), linker
133(<tt>avr-ld</tt>), and librarian (<tt>avr-ar</tt> and <tt>avr-ranlib</tt>).
134In addition, you get tools which extract data from object files
135(<tt>avr-objcopy</tt>), dissassemble object file information
136(<tt>avr-objdump</tt>), and strip information from object files
137(<tt>avr-strip</tt>).  Before we can build the C compiler, these tools need to
138be in place.
139
140Download and unpack the source files:
141
142\verbatim
143$ bunzip2 -c binutils-<version>.tar.bz2 | tar xf -
144$ cd binutils-<version>
145\endverbatim
146
147\note Replace \c &lt;version&gt; with the version of the package you downloaded.
148
149\note If you obtained a gzip compressed file (.gz), use <tt>gunzip</tt>
150instead of <tt>bunzip2</tt>.
151
152It is usually a good idea to configure and build <tt><b>binutils</b></tt> in a
153subdirectory so as not to pollute the source with the compiled files.  This is
154recommended by the <tt><b>binutils</b></tt> developers.
155
156\verbatim
157$ mkdir obj-avr
158$ cd obj-avr
159\endverbatim
160
161The next step is to configure and build the tools. This is done by supplying
162arguments to the <tt>configure</tt> script that enable the AVR-specific
163options.
164
165\verbatim
166$ ../configure --prefix=$PREFIX --target=avr --disable-nls
167\endverbatim
168
169If you don't specify the <tt>--prefix</tt> option, the tools will get
170installed in the \c /usr/local hierarchy (i.e. the binaries will get installed
171in <tt>/usr/local/bin</tt>, the info pages get installed in
172<tt>/usr/local/info</tt>, etc.) Since these tools are changing frequently, It
173is preferrable to put them in a location that is easily removed.
174
175When <tt>configure</tt> is run, it generates a lot of messages while it
176determines what is available on your operating system. When it finishes, it
177will have created several <tt>Makefile</tt>s that are custom tailored to your
178platform. At this point, you can build the project.
179
180\verbatim
181$ make
182\endverbatim
183
184\note BSD users should note that the project's <tt>Makefile</tt> uses GNU
185<tt>make</tt> syntax. This means FreeBSD users may need to build the tools by
186using <tt>gmake</tt>.
187
188If the tools compiled cleanly, you're ready to install them. If you specified
189a destination that isn't owned by your account, you'll need <tt>root</tt>
190access to install them. To install:
191
192\verbatim
193$ make install
194\endverbatim
195
196You should now have the programs from binutils installed into
197<tt>$PREFIX/bin</tt>.  Don't forget to \ref path "set your PATH" environment
198variable before going to build avr-gcc.
199
200
201\section install_avr_gcc GCC for the AVR target
202\addindex installation, gcc
203
204\warning You <em><b>must</b></em> install
205\ref install_avr_binutils "avr-binutils" and make sure your
206\ref path "path is set" properly before installing avr-gcc.
207
208The steps to build \c avr-gcc are essentially same as for
209\ref install_avr_binutils "binutils":
210
211\verbatim
212$ bunzip2 -c gcc-<version>.tar.bz2 | tar xf -
213$ cd gcc-<version>
214$ mkdir obj-avr
215$ cd obj-avr
216$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ \
217    --disable-nls --disable-libssp --with-dwarf2
218$ make
219$ make install
220\endverbatim
221
222To save your self some download time, you can alternatively download only the
223<tt>gcc-core-\<version\>.tar.bz2</tt> and <tt>gcc-c++-\<version\>.tar.bz2</tt>
224parts of the gcc.  Also, if you don't need C++ support, you only need the core
225part and should only enable the C language support.  (Starting with GCC 4.7
226releases, these split files are no longer available though.)
227
228\note Early versions of these tools did not support C++.
229
230\note The stdc++ libs are not included with C++ for AVR due to the size
231limitations of the devices.
232
233
234\section install_avr_libc AVR LibC
235\addindex installation, avr-libc
236
237\warning You <em><b>must</b></em> install
238\ref install_avr_binutils "avr-binutils",
239\ref install_avr_gcc "avr-gcc" and make sure your
240\ref path "path is set" properly before installing avr-libc.
241
242\note If you have obtained the latest avr-libc from cvs, you will have to run
243the \c bootstrap script before using either of the build methods described below.
244
245To build and install avr-libc:
246
247\verbatim
248$ gunzip -c avr-libc-<version>.tar.gz | tar xf -
249$ cd avr-libc-<version>
250$ ./configure --prefix=$PREFIX --build=`./config.guess` --host=avr
251$ make
252$ make install
253\endverbatim
254
255Optionally, generation of debug information can be requested with:
256
257\verbatim
258$ gunzip -c avr-libc-<version>.tar.gz | tar xf -
259$ cd avr-libc-<version>
260$ ./configure --prefix=$PREFIX --build=`./config.guess` --host=avr \
261  --with-debug-info=DEBUG_INFO
262$ make
263$ make install
264\endverbatim
265
266where \c DEBUG_INFO can be one of \c stabs, \c dwarf-2, or \c dwarf-4.
267
268The default is to not generate any debug information, which is
269suitable for binary distributions of avr-libc, where the user does not
270have the source code installed the debug information would refer to.
271
272\section install_avrprog AVRDUDE
273\addindex installation, avrprog
274\addindex installation, avrdude
275
276\note It has been ported to windows (via MinGW or cygwin), Linux and Solaris. Other Unix systems
277should be trivial to port to.
278
279<tt><b>avrdude</b></tt> is part of the FreeBSD ports system. To install it,
280simply do the following:
281
282\verbatim
283# cd /usr/ports/devel/avrdude
284# make install
285\endverbatim
286
287\note Installation into the default location usually requires root
288permissions.  However, running the program only requires access
289permissions to the appropriate \c ppi(4) device.
290
291Building and installing on other systems should use the \c configure system,
292as such:
293
294\verbatim
295$ gunzip -c avrdude-<version>.tar.gz | tar xf -
296$ cd avrdude-<version>
297$ mkdir obj-avr
298$ cd obj-avr
299$ ../configure --prefix=$PREFIX
300$ make
301$ make install
302\endverbatim
303
304
305
306\section install_gdb GDB for the AVR target
307\addindex Installation, gdb
308
309GDB also uses the \c configure system, so to build and install:
310
311\verbatim
312$ bunzip2 -c gdb-<version>.tar.bz2 | tar xf -
313$ cd gdb-<version>
314$ mkdir obj-avr
315$ cd obj-avr
316$ ../configure --prefix=$PREFIX --target=avr
317$ make
318$ make install
319\endverbatim
320
321\note If you are planning on using <tt>avr-gdb</tt>, you will probably want to
322install either \ref install_simulavr "simulavr" or
323\ref install_avarice "avarice" since avr-gdb needs one of these to run as a
324a remote target backend.
325
326
327
328\section install_simulavr SimulAVR
329\addindex installation, simulavr
330
331SimulAVR also uses the \c configure system, so to build and install:
332
333\verbatim
334$ gunzip -c simulavr-<version>.tar.gz | tar xf -
335$ cd simulavr-<version>
336$ mkdir obj-avr
337$ cd obj-avr
338$ ../configure --prefix=$PREFIX
339$ make
340$ make install
341\endverbatim
342
343\note You might want to have already installed
344\ref install_avr_binutils "avr-binutils",
345\ref install_avr_gcc "avr-gcc" and
346\ref install_avr_libc "avr-libc"
347if you want to have the test programs built in the simulavr source.
348
349
350
351\section install_avarice AVaRICE
352\addindex installation, avarice
353
354\note These install notes are not applicable to avarice-1.5 or older. You
355probably don't want to use anything that old anyways since there have been
356many improvements and bug fixes since the 1.5 release.
357
358AVaRICE also uses the \c configure system, so to build and install:
359
360\verbatim
361$ gunzip -c avarice-<version>.tar.gz | tar xf -
362$ cd avarice-<version>
363$ mkdir obj-avr
364$ cd obj-avr
365$ ../configure --prefix=$PREFIX
366$ make
367$ make install
368\endverbatim
369
370\note AVaRICE uses the BFD library for accessing various binary file formats.
371You may need to tell the configure script where to find the lib and headers
372for the link to work. This is usually done by invoking the configure script
373like this (Replace <tt>\<hdr_path\></tt> with the path to the \c bfd.h file on
374your system. Replace <tt>\<lib_path\></tt> with the path to \c libbfd.a on your
375system.):
376
377\verbatim
378$ CPPFLAGS=-I<hdr_path> LDFLAGS=-L<lib_path> ../configure --prefix=$PREFIX
379\endverbatim
380
381
382
383\section install_windows Building and Installing under Windows
384
385Building and installing the toolchain under Windows requires more effort because
386all of the tools required for building, and the programs themselves, are mainly
387designed for running under a POSIX environment such as Unix and Linux. Windows
388does not natively provide such an environment.
389
390There are two projects available that provide such an environment, Cygwin and
391MinGW. There are advantages and disadvantages to both. Cygwin provides a
392very complete POSIX environment that allows one to build many Linux based tools
393from source with very little or no source modifications. However, POSIX
394functionality is provided in the form of a DLL that is linked to the application.
395This DLL has to be redistributed with your application and there are issues if
396the Cygwin DLL already exists on the installation system and different versions
397of the DLL. On the other hand, MinGW can compile code as native Win32
398applications. However, this means that programs designed for Unix and Linux (i.e.
399that use POSIX functionality) will not compile as MinGW does not provide
400that POSIX layer for you. Therefore most programs that compile on both types of
401host systems, usually must provide some sort of abstraction layer to allow an
402application to be built cross-platform.
403
404MinGW does provide somewhat of a POSIX environment, called MSYS, that allows you to
405build Unix and Linux applications as they woud normally do, with a \c configure
406step and a \c make step. Cygwin also provides such an environment. This means
407that building the AVR toolchain is very similar to how it is built in Linux,
408described above. The main differences are in what the PATH environment variable
409gets set to, pathname differences, and the tools that are required to build the
410projects under Windows. We'll take a look at the tools next.
411
412
413\section install_windows_tools Tools Required for Building the Toolchain for Windows
414
415These are the tools that are currently used to build an AVR tool chain.
416This list may change, either the version of the tools, or the tools themselves,
417as improvements are made.
418
419- <b>MinGW</b><br>
420    Download the MinGW Automated Installer, 20100909 (or later)
421	<http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20100909/mingw-get-inst-20100909.exe/download>
422	- Run mingw-get-inst-20100909.exe
423	- In the installation wizard, keep the default values and press the "Next" button
424	for all installer pages except for the pages explicitly listed below.
425    - In the installer page "Repository Catalogues", select the "Download latest
426	repository catalogues" radio button, and press the "Next" button
427	- In the installer page "License Agreement", select the "I accept the agreement"
428	radio button, and press the "Next" button
429	- In the installer page "Select Components", be sure to select these items:
430		- C compiler (default checked)
431		- C++ compiler
432		- Ada compiler
433		- MinGW Developer Toolkit (which includes "MSYS Basic System").
434	- Install.
435
436- <b>Install Cygwin</b><br>
437    - Install everything, all users, UNIX line endings. This will take a *long* time.
438    A fat internet pipe is highly recommended. It is also recommended that you
439    download all to a directory first, and then install from that directory to
440    your machine.
441
442\note GMP, MPFR, and MPC are required to build GCC.
443\note GMP is a prequisite for building MPFR. Build GMP first.
444\note MPFR is a prerequisite for building MPC. Build MPFR second.
445
446- <b>Build GMP for MinGW</b><br>
447    - Latest Version
448    - <http://gmplib.org/>
449    - Build script:
450        \verbatim
451        ./configure  2>&1 | tee gmp-configure.log
452        make         2>&1 | tee gmp-make.log
453        make check   2>&1 | tee gmp-make-check.log
454        make install 2>&1 | tee gmp-make-install.log
455        \endverbatim
456    - GMP headers will be installed under /usr/local/include and library installed
457    under /usr/local/lib.
458
459- <b>Build MPFR for MinGW</b><br>
460    - Latest Version
461    - <http://www.mpfr.org/>
462    - Build script:
463        \verbatim
464        ./configure --with-gmp=/usr/local --disable-shared 2>&1 | tee mpfr-configure.log
465        make         2>&1 | tee mpfr-make.log
466        make check   2>&1 | tee mpfr-make-check.log
467        make install 2>&1 | tee mpfr-make-install.log
468        \endverbatim
469    - MPFR headers will be installed under /usr/local/include and library installed
470    under /usr/local/lib.
471
472- <b>Build MPC for MinGW</b><br>
473    - Latest Version
474    - <http://www.multiprecision.org/>
475    - Build script:
476        \verbatim
477        ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --disable-shared 2>&1 | tee mpfr-configure.log
478        make         2>&1 | tee mpfr-make.log
479        make check   2>&1 | tee mpfr-make-check.log
480        make install 2>&1 | tee mpfr-make-install.log
481        \endverbatim
482    - MPFR headers will be installed under /usr/local/include and library installed
483    under /usr/local/lib.
484
485\note Doxygen is required to build AVR-LibC documentation.
486- <b>Install Doxygen</b><br>
487    - Version 1.7.2
488    - <http://www.stack.nl/~dimitri/doxygen/>
489    - Download and install.
490
491\note NetPBM is required to build graphics in the AVR-LibC documentation.
492- <b>Install NetPBM</b><br>
493    - Version 10.27.0
494    - From the GNUWin32 project: <http://gnuwin32.sourceforge.net/packages.html>
495    - Download and install.
496
497\note fig2dev is required to build graphics in the AVR-LibC documentation.
498- <b>Install fig2dev</b><br>
499    - Version 3.2 patchlevel 5c
500    - From WinFig 4.62: <http://www.schmidt-web-berlin.de/winfig/>
501    - Download the zip file version of WinFig
502    - Unzip the download file and install fig2dev.exe in a location of your
503    choice, somewhere in the PATH.
504    - You may have to unzip and install related DLL files for fig2dev. In the
505    version above, you have to install QtCore4.dll and QtGui4.dll.
506
507\note MikTeX is required to build various documentation.
508- <b>Install MiKTeX</b><br>
509    - Version 2.9
510    - <http://miktex.org/>
511    - Download and install.
512
513\note Ghostscript is required to build various documentation.
514- <b>Install Ghostscript</b><br>
515    - Version 9.00
516    - <http://www.ghostscript.com>
517    - Download and install.
518    - In the \\bin subdirectory of the installaion, copy gswin32c.exe to gs.exe.
519
520- Set the TEMP and TMP environment variables to <b>c:\\temp</b> or to the short filename
521    version. This helps to avoid NTVDM errors during building.
522
523
524\section install_windows_building Building the Toolchain for Windows
525
526All directories in the PATH enviornment variable should be specified using their
527short filename (8.3) version. This will also help to avoid NTVDM errors during
528building. These short filenames can be specific to each machine.
529
530Build the tools below in MinGW/MSYS.
531
532- <b>Binutils</b><br>
533    - Open source code pacakge and patch as necessary.
534    - Configure and build in a directory outside of the source code tree.
535    - Set PATH, in order:
536        - \<MikTex executables\>
537		- \<ghostscript executables\>
538        - /usr/local/bin
539        - /usr/bin
540        - /bin
541        - /mingw/bin
542        - c:/cygwin/bin
543        - \<install directory\>/bin
544    - Configure
545        \verbatim
546        CFLAGS=-D__USE_MINGW_ACCESS  \
547        ../$archivedir/configure \
548            --prefix=$installdir \
549            --target=avr \
550            --disable-nls \
551            --enable-doc \
552            --datadir=$installdir/doc/binutils \
553            --with-gmp=/usr/local \
554            --with-mpfr=/usr/local \
555            2>&1 | tee binutils-configure.log
556		\endverbatim
557    - Make
558        \verbatim
559        make all html install install-html 2>&1 | tee binutils-make.log
560        \endverbatim
561    - Manually change documentation location.
562
563
564- <b>GCC</b><br>
565    - Open source code pacakge and patch as necessary.
566    - Configure and build in a directory outside of the source code tree.
567    - Set PATH, in order:
568        - \<MikTex executables\>
569		- \<ghostscript executables\>
570        - /usr/local/bin
571        - /usr/bin
572        - /bin
573        - /mingw/bin
574        - c:/cygwin/bin
575        - \<install directory\>/bin
576    - Configure
577        \verbatim
578		LDFLAGS='-L /usr/local/lib -R /usr/local/lib' \
579		CFLAGS='-D__USE_MINGW_ACCESS'  \
580		../gcc-$version/configure \
581			--with-gmp=/usr/local \
582			--with-mpfr=/usr/local \
583			--with-mpc=/usr/local \
584			--prefix=$installdir \
585			--target=$target \
586			--enable-languages=c,c++ \
587			--with-dwarf2 \
588			--enable-doc \
589			--with-docdir=$installdir/doc/$project \
590			--disable-shared \
591			--disable-libada \
592			--disable-libssp \
593			2>&1 | tee $project-configure.log
594		\endverbatim
595    - Make
596        \verbatim
597        make all html install 2>&1 | tee $package-make.log
598        \endverbatim
599
600
601- <b>avr-libc</b><br>
602    - Open source code package.
603    - Configure and build at the top of the source code tree.
604    - Set PATH, in order:
605        - /usr/local/bin
606        - /mingw/bin
607        - /bin
608        - \<MikTex executables\>
609        - \<install directory\>/bin
610        - \<Doxygen executables\>
611        - \<NetPBM executables\>
612        - \<fig2dev executable\>
613        - \<Ghostscript executables\>
614        - c:/cygwin/bin
615    - Configure
616        \verbatim
617        ./configure \
618            --host=avr \
619            --prefix=$installdir \
620            --enable-doc \
621            --disable-versioned-doc \
622            --enable-html-doc \
623            --enable-pdf-doc \
624            --enable-man-doc \
625            --mandir=$installdir/man \
626            --datadir=$installdir \
627            2>&1 | tee $package-configure.log
628        \endverbatim
629    - Make
630        \verbatim
631        make all install 2>&1 | tee $package-make.log
632        \endverbatim
633    - Manually change location of man page documentation.
634    - Move the examples to the top level of the install tree.
635    - Convert line endings in examples to Windows line endings.
636    - Convert line endings in header files to Windows line endings.
637
638- <b>AVRDUDE</b><br>
639    - Open source code package.
640    - Configure and build at the top of the source code tree.
641    - Set PATH, in order:
642        - \<MikTex executables\>
643        - /usr/local/bin
644        - /usr/bin
645        - /bin
646        - /mingw/bin
647        - c:/cygwin/bin
648        - \<install directory\>/bin
649    - Set location of LibUSB headers and libraries
650        \verbatim
651        export CPPFLAGS="-I../../libusb-win32-device-bin-$libusb_version/include"
652        export CFLAGS="-I../../libusb-win32-device-bin-$libusb_version/include"
653        export LDFLAGS="-L../../libusb-win32-device-bin-$libusb_version/lib/gcc"
654        \endverbatim
655    - Configure
656        \verbatim
657        ./configure \
658            --prefix=$installdir \
659            --datadir=$installdir \
660            --sysconfdir=$installdir/bin \
661            --enable-doc \
662            --disable-versioned-doc \
663            2>&1 | tee $package-configure.log
664        \endverbatim
665    - Make
666        \verbatim
667        make -k all install 2>&1 | tee $package-make.log
668        \endverbatim
669    - Convert line endings in avrdude config file to Windows line endings.
670    - Delete backup copy of avrdude config file in install directory if exists.
671
672- <b>Insight/GDB</b><br>
673    - Open source code pacakge and patch as necessary.
674    - Configure and build in a directory outside of the source code tree.
675    - Set PATH, in order:
676        - \<MikTex executables\>
677        - /usr/local/bin
678        - /usr/bin
679        - /bin
680        - /mingw/bin
681        - c:/cygwin/bin
682        - \<install directory\>/bin
683    - Configure
684        \verbatim
685        CFLAGS=-D__USE_MINGW_ACCESS  \
686        LDFLAGS='-static' \
687        ../$archivedir/configure \
688            --prefix=$installdir \
689            --target=avr \
690            --with-gmp=/usr/local \
691            --with-mpfr=/usr/local \
692            --enable-doc \
693            2>&1 | tee insight-configure.log
694        \endverbatim
695    - Make
696        \verbatim
697        make all install 2>&1 | tee $package-make.log
698        \endverbatim
699
700- <b>SRecord</b><br>
701    - Open source code package.
702    - Configure and build at the top of the source code tree.
703    - Set PATH, in order:
704        - \<MikTex executables\>
705        - /usr/local/bin
706        - /usr/bin
707        - /bin
708        - /mingw/bin
709        - c:/cygwin/bin
710        - \<install directory\>/bin
711    - Configure
712        \verbatim
713        ./configure \
714            --prefix=$installdir \
715            --infodir=$installdir/info \
716            --mandir=$installdir/man \
717            2>&1 | tee $package-configure.log
718        \endverbatim
719    - Make
720        \verbatim
721        make all install 2>&1 | tee $package-make.log
722        \endverbatim
723
724
725Build the tools below in Cygwin.
726
727- <b>AVaRICE</b><br>
728    - Open source code package.
729    - Configure and build in a directory outside of the source code tree.
730    - Set PATH, in order:
731        - \<MikTex executables\>
732        - /usr/local/bin
733        - /usr/bin
734        - /bin
735        - \<install directory\>/bin
736    - Set location of LibUSB headers and libraries
737        \verbatim
738        export CPPFLAGS=-I$startdir/libusb-win32-device-bin-$libusb_version/include
739        export CFLAGS=-I$startdir/libusb-win32-device-bin-$libusb_version/include
740        export LDFLAGS="-static -L$startdir/libusb-win32-device-bin-$libusb_version/lib/gcc "
741        \endverbatim
742    - Configure
743        \verbatim
744        ../$archivedir/configure \
745        --prefix=$installdir \
746        --datadir=$installdir/doc \
747        --mandir=$installdir/man \
748        --infodir=$installdir/info \
749        2>&1 | tee avarice-configure.log
750        \endverbatim
751    - Make
752        \verbatim
753        make all install 2>&1 | tee avarice-make.log
754        \endverbatim
755
756- <b>SimulAVR</b><br>
757    - Open source code package.
758    - Configure and build in a directory outside of the source code tree.
759    - Set PATH, in order:
760        - \<MikTex executables\>
761        - /usr/local/bin
762        - /usr/bin
763        - /bin
764        - \<install directory\>/bin
765    - Configure
766        \verbatim
767        export LDFLAGS="-static"
768        ../$archivedir/configure \
769            --prefix=$installdir \
770            --datadir=$installdir \
771            --disable-tests \
772            --disable-versioned-doc \
773            2>&1 | tee simulavr-configure.log
774        \endverbatim
775    - Make
776        \verbatim
777        make -k all install 2>&1 | tee simulavr-make.log
778        make pdf install-pdf 2>&1 | tee simulavr-pdf-make.log
779        \endverbatim
780
781
782*/
783