Downloading and Installation
Contributions and Development Projects
Building the SPARClite development tools for Windows
eCos requires sparclite-elf development tools to develop programs for SPARClite targets.
The development tools come in three parts: the GNU compiler collection
(GCC), the GNU Debugger (GDB) and the GNU binary utilities,
which include the GNU assembler and linker.
This page details the steps required to download and build these development tools.
Downloading the tool sources
GNU Binary Utilities
It is recommended that eCos is used with the most recent official
release of the GNU Binary Utilities (binutils), currently version 2.10.1.
This is available from the binutils area of the
main GNU software
download site or any of its mirror sites. It is also available at any of the
mirror sites for sources.redhat.com. Download sizes are in the
region of 5.5MB for .bz2 format archives, or 7MB for .gz format archives.
Weekly and daily snapshots from the CVS repository are also available
from the main
binutils development site, but these have not been verified
for use with eCos.
If you already have binutils sources available but are unsure
of their version, you can search the file gas/configure for the string
"VERSION" and examine its value.
GNU Compiler Collection
The GNU Compiler Collection
web site contains plenty of information about installing and using GCC.
snapshot of the GCC development sources may be used to obtain the most
up-to-date compiler with new features and bug fixes.
However, it is recommended that the most recent
official release (GCC 2.95.2) is used, as it is likely to be more stable.
GCC 2.95.2 sources can be downloaded from the
releases page. Both the core distribution and the C++ distribution
files are required for eCos. Alternatively, click on the appropriate
following links to download the files directly:
Note that the instructions for building GCC here are only intended for use
with eCos. In any other environment, the tools may not function correctly.
Refer to the CrossGCC
FAQ for details about building a standalone version of GCC.
It is strongly recommended you use a mirror site close to you, which will result in a faster
download, reduced internet congestion, and reduced load on the central
Instructions for downloading the GNU Debugger (GDB) are provided
GDB home page.
However, Red Hat has also released an open source graphical front-end to GDB based on
Tcl/Tk called Insight, which has a separate
The Insight sources are a superset of the standard GDB sources. It is also
still possible to run GDB in command-line mode by using the -nw
command-line option when invoking GDB, so there is nothing to lose by using the Insight
The latest release (version 5.0) is recommended and may be downloaded via the GDB home page.
Alternatively, click on on one of following links to download the files directly:
Preparing the sources for building
Once the tools sources have been downloaded, they must be prepared before
building. These instructions assume that the tool sources will be extracted in the /src directory hierarchy.
Other locations may be substituted throughout. Similarly placeholders of the form YYYYMMDD and
YYMMDD should be replaced with the actual date of the downloaded files. Ensure that the file system used
has sufficient free space available. The contents of each archive will expand
to occupy approximately 6 times the space required by the compressed archive itself.
The following steps should be followed at the Cygwin bash prompt:
- Create a directory for each set of tool sources, avoiding directory names containing spaces as these can confuse the
mkdir -p /src/binutils /src/gcc /src/gdb
- Extract the sources for each tool directory in turn. For bzip2 archives:
bunzip2 < binutils-2.10.1.tar.bz2 | tar xvf -
bunzip2 < gcc-core-2.95.2.tar.bz2 | tar xvf -
bunzip2 < gcc-g++-2.95.2.tar.bz2 | tar xvf -
bunzip2 < insight-5.0.tar.bz2 | tar xvf -
The following directories should be generated and populated during the extraction process:
If the standard GDB source distribution was downloaded rather than Insight,
then the GDB tools source directory will be /src/gdb/gdb-5.0 rather than
- You may now need to apply a small number of source patches that are
required to fix outstanding problems and add eCos support to the tools.
Patches may be downloaded using most browsers by either shift-clicking
or right-clicking on the link to the patch. You must not view the link
and cut-and-paste because white space must be preserved exactly.
Cygwin users should verify that their /tmp directory (or
the directory specified by the TMPDIR, TMP or TEMP
environment variables) is mounted in binary mode. If this is not the case
the patches will apply, but the build will later fail. You may verify this
using the Cygwin mount command. If /tmp is not explicitly listed,
the entry for / will be used. If it says textmode for this entry,
use the following command from a Cygwin bash prompt:
mount -f -b c:/cygwin/tmp /tmp
You may need to substitute another path for c:/cygwin if Cygwin
was installed to another directory.
If Insight 5.0 is being used, rather than the standard GDB source
distribution, then you must download the
insight-tcl.pat patch to a file and apply it:
tr -d '\r' < insight-tcl.pat | patch -p0
ecos-gcc-2952.pat patch to a file and apply it:
tr -d '\r' < ecos-gcc-2952.pat | patch -p0
You must then reset the source file timestamps to ensure that makefile dependencies
are handled correctly:
If any of the patches fail to apply you should see if there is some
obvious problem by attempting to apply the patch manually. If this is not
possible, report the problem to the
ecos-discuss mailing list.
If the patch utility reports the following message:
Reversed (or previously applied) patch detected! Assume -R? [n]
then type n because this indicates the patch has already been applied
in the master sources.
Building the tools
Before attempting to build the tools, ensure that the GNU native compiler tools directory is on the
PATH and precedes the current directory. The
following build procedures will fail if . is ahead of the native tools in the PATH.
Avoid using spaces in build and install directory paths. Building on an NTFS file system is
strongly recommended due to the large number of small files involved in the build process.
Cygwin users must set the MAKE_MODE environment variable as follows:
Approximate disk space requirements for building the development tools are as follows:
Following successful building and installation of each set of tools, the associated build
tree may be deleted to save space if necessary. These instructions assume that the tools
will be built in the /tmp/build directory hierarchy and
installed to /tools. Other locations may be substituted throughout:
On completion, the SPARClite development tool executable files will be located at /tools/H-i686-pc-cygwin/bin.
This directory should be added to the head of your PATH.
The eCos Configuration Tool also allows you to set the build tools path.
- Configure the GNU Binary Utilities:
mkdir -p /tmp/build/binutils
/src/binutils/binutils-2.10.1/configure --target=sparclite-elf \
-v 2>&1 | tee configure.out
If there are any problems configuring the tools, you can refer to the file
configure.out as a permanent record of what happened.
- Build and install the GNU Binary Utilities:
make -w all install 2>&1 | tee make.out
If there are any problems building the tools, you can use the file
make.out as a permanent record of what happened.
- Configure GCC, ensuring that the GNU Binary Utilities are at the head of the PATH:
PATH=/tools/H-i686-pc-cygwin/bin:$PATH ; export PATH (for sh, ksh and bash users)
set path = ( /tools/H-i686-pc-cygwin/bin $path ) (for csh and tcsh users)
mkdir -p /tmp/build/gcc
/src/gcc/gcc-2.95.2/configure --target=sparclite-elf \
--with-gnu-as --with-gnu-ld --with-newlib \
-v 2>&1 | tee configure.out
- Build and install GCC:
make -w all-gcc install-gcc \
LANGUAGES="c c++" 2>&1 | tee make.out
- Configure Insight:
mkdir -p /tmp/build/gdb
/src/gdb/insight-5.0/configure --target=sparclite-elf \
-v 2>&1 | tee configure.out
- Build and install Insight:
make -w all install CC='gcc -mwin32' 2>&1 | tee make.out
If you encounter difficulties in building or using the development tools, first check
the eCos FAQ and the
ecos-discuss mailing list archive to see
if the topic has come up before. Initial queries
may be directed to the ecos-discuss list. However,
there are other mailing lists which may be more appropriate if a problem is clearly
related to a particular tool:
Before sending messages to the mailing lists, you would also be advised to
consult the various web sites associated with each list, to see if there is
any relevant documentation or FAQs:
It is also worth noting that all these mailing lists have searchable archives.