Newer
Older
http://gnuwin32.sourceforge.net/packages.html for a list of all of the tools
available in the GNUWin32 package.
The SourceForge project is located here:
http://sourceforge.net/projects/gnuwin32/. The project is still being
actively supported (although some of the Windows ports have gotten very old).
Some commercial toolchains include a subset of the GNUWin32 tools in the
installation. My recommendation is that you download the GNUWin32 tools
directly from the sourceforge.net website so that you will know what you are
using and can reproduce your build environment.
The following steps will download and execute the GNUWin32 installer.
1. Download GetGNUWin32-x.x.x.exe from
http://sourceforge.net/projects/getgnuwin32/files/. This is the
installer. The current version as of this writing is 0.6.3.
4. Select the installation directory. My recommendation is the
directory that contains this README file (<this-directory>).
5. After running GetGNUWin32-0.x.x.exe, you will have a new directory
<this-directory>/GetGNUWin32
Note that the GNUWin32 installer didn't install GNUWin32. Instead, it
installed another, smarter downloader. That downloader is the GNUWin32
package management tool developed by the Open SSL project.
The following steps probably should be performed from inside a DOS shell.
6. Change to the directory created by GetGNUWin32-x.x.x.exe
7. Execute the download.bat script. The download.bat script will download
about 446 packages! Enough to have a very complete Linux-like environment
under the DOS shell. This will take awhile. This step only downloads
the packages and the next step will install the packages.
8. This step will install the downloaded packages. The argument of the
install.bat script is the installation location. C:\gnuwin32 is the
standard install location:
NOTE: This installation step will install *all* GNUWin32 packages... far
more than you will ever need. If disc space is a problem for you, you might
need to perform a manual installation of the individual ZIP files that you
will find in the <this directory>/GetGNUWin32/packages directory.
CYGWIN BUILD PROBLEMS
^^^^^^^^^^^^^^^^^^^^^
patacongo
committed
Strange Path Problems
---------------------
patacongo
committed
If you see strange behavior when building under Cygwin then you may have
a problem with your PATH variable. For example, if you see failures to
locate files that are clearly present, that may mean that you are using
the wrong version of a tool. For example, you may not be using Cygwin's
'make' program at /usr/bin/make. Try:
When you install some toolchains (such as Yargarto or CodeSourcery tools),
they may modify your PATH variable to include a path to their binaries.
At that location, they make have GNUWin32 versions of the tools. So you
might actually be using a version of make that does not understand Cygwin
paths.
The solution is either:
1. Edit your PATH to remove the path to the GNUWin32 tools, or
2. Put /usr/local/bin, /usr/bin, and /bin at the front of your path:
$ export PATH=/usr/local/bin:/usr/bin:/bin:$PATH
patacongo
committed
Window Native Toolchain Issues
------------------------------
patacongo
committed
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
There are many popular Windows native toolchains that may be used with NuttX.
Examples include CodeSourcery (for Windows), devkitARM, and several vendor-
provied toolchains. There are several limitations with using a and Windows
based toolchain in a Cygwin environment. The three biggest are:
1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
performed automatically in the Cygwin makefiles using the 'cygpath' utility
but you might easily find some new path problems. If so, check out 'cygpath -w'
2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
are used in Nuttx (e.g., include/arch). The make system works around these
problems for the Windows tools by copying directories instead of linking them.
But this can also cause some confusion for you: For example, you may edit
a file in a "linked" directory and find that your changes had no effect.
That is because you are building the copy of the file in the "fake" symbolic
directory. If you use a Windows toolchain, you should get in the habit of
making like this:
make clean_context all
An alias in your .bashrc file might make that less painful. The rebuild
is not a long as you might think because there is no dependency checking
if you are using a native Windows toolchain. That bring us to #3:
3. Dependencies are not made when using Windows versions of the GCC on a POSIX
platform (i.e., Cygwin). This is because the dependencies are generated
using Windows paths which do not work with the Cygwin make.
patacongo
committed
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
patacongo
committed
If you are building natively on Windows, then no such conflict exists
and the best selection is:
patacongo
committed
patacongo
committed
General Pre-built Toolchain Issues
To continue with the list of "Window Native Toolchain Issues" we can add
the following. These, however, are really just issues that you will have
if you use any pre-built toolchain (vs. building the NuttX toolchain from
the NuttX buildroot package):
There may be incompatibilities with header files, libraries, and compiler
built-in functions at detailed below. For the most part, these issues
are handled in the existing make logic. But if you are breaking new ground,
patacongo
committed
4. Header Files. Most pre-built toolchains will build with a foreign C
library (usually newlib, but maybe uClibc or glibc if you are using a
patacongo
committed
Linux toolchain). This means that the header files from the foreign
C library will be built into the toolchain. So if you "include <stdio.h>",
you will get the stdio.h from the incompatible, foreign C library and
not the nuttx stdio.h (at nuttx/include/stdio.h) that you wanted.
This can cause really confusion in the builds and you must always be
patacongo
committed
sure the -nostdinc is included in the CFLAGS. That will assure that
patacongo
committed
5. Libraries. What was said above header files applies to libraries.
You do not want to include code from the libraries of any foreign
C libraries built into your toolchain. If this happens you will get
perplexing errors about undefined symbols. To avoid these errors,
patacongo
committed
you will need to add -nostdlib to your CFLAGS flags to assure that
you only take code from the NuttX libraries.
This, however, may causes other issues for libraries in the toolchain
that you do want (like libgcc.a or libm.a). These are special-cased
in most Makefiles, but you could still run into issues of missing
libraries.
6. Built-Ins. Some compilers target a particular operating system.
Many people would, for example, like to use the same toolchain to
develop Linux and NuttX software. Compilers built for other
operating systems may generate incompatible built-in logic and,
for this reason, -fno-builtin should also be included in your
C flags
And finally you may not be able to use NXFLAT.
7. NXFLAT. If you use a pre-built toolchain, you will lose all support
for NXFLAT. NXFLAT is a binary format described in
patacongo
committed
Documentation/NuttXNxFlat.html. It may be possible to build
standalone versions of the NXFLAT tools; there are a few examples
of this in the buildroot repository at https://bitbucket.org/nuttx/buildroot
However, it is possible that there could be interoperability issues
with your toolchain since they will be using different versions of
patacongo
committed
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
Building Original Linux Boards in Cygwin
Some default board configurations are set to build under Linux and others
to build under Windows with Cygwin. Various default toolchains may also
be used in each configuration. It is possible to change the default
setup. Here, for example, is what you must do in order to compile a
default Linux configuration in the Cygwin environment using the
CodeSourceery for Windows toolchain. After instantiating a "canned"
NuttX configuration, run the target 'menuconfig' and set the following
items:
Build Setup->Build Host Platform->Windows
Build Setup->Windows Build Environment->Cygwin
System Type->Toolchain Selection->CodeSourcery GNU Toolchain under Windows
In Windows 7 it may be required to open the Cygwin shell as Administrator
("Run As" option, right button) you find errors like "Permission denied".
Recovering from Bad Configurations
Many people make the mistake of configuring NuttX with the "canned"
configuration and then just typing 'make' with disastrous consequences;
the build may fail with mysterious, uninterpretable, and irrecoverable
build errors. If, for example, you do this with an unmodified Linux
configuration in a Windows/Cgwin environment, you will corrupt the
build environment. The environment will be corrupted because of POSIX vs
Windows path issues and with issues related to symbolic links. If you
make the mistake of doing this, the easiest way to recover is to just
start over: Do 'make distclean' to remove every trace of the corrupted
configuration, reconfigure from scratch, and make certain that the set
the configuration correctly for your platform before attempting to make
again.
Just fixing the configuration file after you have instantiated the bad
configuration with 'make' is not enough.
Additional information can be found in the Documentation/ directory and
also in README files that are scattered throughout the source tree. The
documentation is in HTML and can be access by loading the following file
into your Web browser:
Documentation/index.html
NuttX documentation is also available online at http://www.nuttx.org.
Below is a guide to the available README files in the NuttX source tree:
| | `- src
| | `- lpc214x/README.txt
| |- sh/
| | |- include/
| | | `-README.txt
| | |- src/
| | | `-README.txt
| |- x86/
| | |- include/
| | | `-README.txt
| | `- src/
| | `-README.txt
| | `- z180/README.txt, z180_mmu.txt
|- binfmt/
| `-libpcode/
| `-README.txt
| |- amber/
| | `- README.txt
| |- arduino-due/
| | `- README.txt
| |- cc3200-launchpad/
| | `- README.txt
| |- cloudctrl
| | `- README.txt
| |- compal_e86
| | `- README.txt
| |- compal_e88
| | `- README.txt
| |- compal_e99
| | `- README.txt
| |- ea3131/
| | `- README.txt
| |- efm32-g8xx-stk/
| | `- README.txt
Gregory Nutt
committed
| |- efm32gg-stk3700/
| | `- README.txt
| |- ekk-lm3s9b96/
| | `- README.txt
| |- ez80f910200kitg/
| | |- ostest/README.txt
| | `- README.txt
| |- ez80f910200zco/
| | |- dhcpd/README.txt
| | |- httpd/README.txt
| | |- nettest/README.txt
| | |- nsh/README.txt
| | |- ostest/README.txt
| | |- poll/README.txt
| | `- README.txt
| |- fire-stm32v2/
| |- freedom-kl25z/
| | `- README.txt
| |- freedom-kl26z/
Gregory Nutt
committed
| | `- README.txt
| |- kwikstik-k40/
| | `- README.txt
| |- lincoln60/
| | `- README.txt
| |- lm3s6965-ek/
| | `- README.txt
| |- lm3s8962-ek/
| |- lpc4330-xplorer/
| | `- README.txt
| |- lpc4357-evb/
| | `- README.txt
Gregory Nutt
committed
| |- lpcxpresso-lpc1115/
| | `- README.txt
| |- lpcxpresso-lpc1768/
| | `- README.txt
| |- maple/
| | `- README.txt
| |- micropendous3/
| | `- README.txt
Gregory Nutt
committed
| |- mikroe-stm32f/
| | `- README.txt
| |- mirtoo/
| | `- README.txt
| |- moteino-mega/
| | `- README.txt
| |- ne63badge/
| | `- README.txt
| |- ntosd-dm320/
| | |- doc/README.txt
| | `- README.txt
| |- nucleo-f4x1re/
Gregory Nutt
committed
| | `- README.txt
| |- nucleus2g/
| |- nutiny-nuc120/
| | `- README.txt
| |- olimex-efm32g880f129-stk/
| | `- README.txt
| |- olimex-lpc-h3131/
| | `- README.txt
| |- olimex-stm32-h405/
| | `- README.txt
| |- olimex-stm32-p107/
| | `- README.txt
| |- olimex-stm32-p207/
| | `- README.txt
| |- open1788/
| | `- README.txt
| |- p112/
| | `- README.txt
| |- pcblogic-pic32mx/
| | `- README.txt
| |- pcduino-a10/
| | `- README.txt
Gregory Nutt
committed
| |- pic32mx-starterkit/
| |- pic32mx7mmb/
| | `- README.txt
| |- pic32mz-starterkit/
| | `- README.txt
Gregory Nutt
committed
| |- pirelli_dpl10/
| | `- README.txt
| |- qemu-i486/
| |- rgmp/
Gregory Nutt
committed
| |- sama5d3x-ek/
| | `- README.txt
Gregory Nutt
committed
| |- sama5d3-xplained/
| | `- README.txt
| |- sama5d4-ek/
| | `- README.txt
| |- samd20-xplained/
| | `- README.txt
| |- samd21-xplained/
| | `- README.txt
Gregory Nutt
committed
| |- saml21-xplained/
| | `- README.txt
Gregory Nutt
committed
| |- sam4l-xplained/
| | `- README.txt
| |- sam4s-xplained/
| | `- README.txt
| |- sam4s-xplained-pro/
| | `- README.txt
| |- samv7i-xult/
| | `- README.txt
patacongo
committed
| |- shenzhou/
| | `- README.txt
Gregory Nutt
committed
| |- spark/
| | `- README.txt
| |- stm3210e-eval/
| | |- RIDE/README.txt
| | `- README.txt
Gregory Nutt
committed
| |- stm32_tiny/
| | `- README.txt
| |- stm32f3discovery/
| | `- README.txt
| |- stm32f4discovery/
| | `- README.txt
Gregory Nutt
committed
| |- stm32f429i-disco/
| | |- ltdc/README.txt
Gregory Nutt
committed
| | `- README.txt
| |- stm32f746g-disco/
| | `- README.txt
Gregory Nutt
committed
| |- stm32ldiscovery/
Gregory Nutt
committed
| |- stm32vldiscovery/
| | `- README.txt
| |- sure-pic32mx/
| | `- README.txt
Gregory Nutt
committed
| |- teensy-2.0/
| |- teensy-3.x/
Gregory Nutt
committed
| |- teensy-lc/
| | `- README.txt
| |- tm4c123g-launchpad/
| | `- README.txt
| |- tm4c1294-launchpad/
| | `- README.txt
| |- twr-k60n512/
| | `- README.txt
| |- ubw32/
| | `- README.txt
| |- viewtool-stm32f107/
| | `- README.txt
| |- xtrs/
| | `- README.txt
| |- z16f2800100zcog/
| | |- ostest/README.txt
| | |- pashello/README.txt
| | `- README.txt
| |- z80sim/
| | `- README.txt
| |- z8encore000zco/
| | |- ostest/README.txt
| | `- README.txt
| |- z8f64200100kit/
| | |- ostest/README.txt
| | `- README.txt
| |- zkit-arm-1769/
| | `- README.txt
| |- zp214xpa/
| | `- README.txt
| |- sercomm/
| | `- README.txt
patacongo
committed
| |- syslog/
| | `- README.txt
| |- binfs/
| | `- README.txt
Gregory Nutt
committed
| |- nxffs/
| | `- README.txt
| |- smartfs/
| | `- README.txt
Gregory Nutt
committed
| |- procfs/
| | `- README.txt
| `- unionfs/
|- lib/
| `- README.txt
patacongo
committed
|- libc/
|- libnx/
| `- README.txt
| |- shm/
| | `- README.txt
Below is a guide to the available README files in the semi-optional apps/
source tree:
apps/
|- examples/
| |- bastest/README.txt
| |- pashello/README.txt
| `- README.txt
|- interpreters/
Gregory Nutt
committed
| | `- README.txt
| |- ficl
| | `- README.txt
| `- README.txt
|- modbus/
| `- README.txt
|- netutils/
| |- discover
| | `- README.txt
| |- ftpc
| | `- README.txt
| |- telnetd
| | `- README.txt
| `- README.txt
|- nshlib/
| `- README.txt
|- system/
| |- cdcacm
| | `- README.txt
| |- i2c
| | `- README.txt
| |- install
| | `- README.txt
| |- symtab/
| | `- README.txt
| |- usbmsc
| | `- README.txt
| |- zmodem
| | `- README.txt
| `- zoneinfo
| `- README.txt
`- README.txt
Additional README.txt files in the other, related repositories:
NxWidgets/
|- Doxygen
| `- README.txt
|- tools
| `- README.txt
|- UnitTests
| `- README.txt
`- README.txt