About eCos |
Building a toolchain for use with eCosIntroductionThe eCos source code is designed for compilation with a GNU toolchain. Pre-built toolchains are available for a number of target architectures and we recommend that such a toolchain is used where available. Developers targetting one of the other architectures must build a toolchain themselves at present. This page details the steps required to download toolchain sources and build them on either a Windows host (assuming Cygwin has already been installed) or a Linux host. Note that the instructions presented here are intended for building a cross toolchain for use with eCos only. Note also, that these instructions apply only to the building of the older toolchains which were used with eCos 2.0.Downloading source codeThe GNU toolchain sources are made available for download in many component parts. The following parts are required for use with eCos:
GNU binary utilitiesIt is recommended that eCos is built with the most recent official release of the GNU binary utilities (binutils). This is available for download from the binutils area of the GNU FTP site or any of its mirror sites. You should download a file with a name of the form binutils-version.tar.bz2 or click on the following link to download version 2.13.1 directly:
GNU compiler collectionIt is recommended that eCos is built with GCC 3.2.1 at present. This is available for download from the GCC area of the GNU FTP site or any of its mirror sites. Click on each of the following links to download the core and g++ components of version 3.2.1 directly:
NewlibNewlib provides support for building the run-time elements of C++ within the toolchain. It is recommended that eCos is built with the the most recent official release of Newlib. This is available for download from the Newlib area of sources.redhat.com or any of its mirror sites. You should download a file with a name of the form newlib-version.tar.gz or click on the following link to download version 1.11.0 directly:
GDBInstructions for downloading GDB are available via the GDB home page. However, a graphical user interface for GDB named Insight is also available. Insight has a separate home page. The Insight sources are a superset of the standard GDB sources and it is still possible to use command-line GDB after building from the Insight sources. We therefore recommend downloading the most recent official release of Insight rather than standard GDB. Both Insight and standard GDB are available for download from the GDB area of sources.redhat.com or any of its mirror sites. You should download a file with a name of the form insight-version.tar.bz2 or gdb-version.tar.bz2 or click on one of the following links to download directly:
Preparing the sources for buildingOnce 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. Ensure that the file system used has sufficient free space available. The contents of each archive will expand to occupy approximately six times the space required by the compressed archive itself. To extract the downloaded sources, you will need to have both the bzip2 and gzip compression utilities. The patch and tar utilities are also required. All these tools are supplied with most Linux distributions and with Cygwin.The following steps should be followed at a bash shell prompt:
Building the toolchainBefore 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.These instructions assume that the tools will be built in the /tmp/build directory hierarchy and installed to /gnutools. Other locations may be substituted throughout. The appropriate GNU architecture identifier for the intended eCos target platform should be substituted for the word TARGET as follows:
The following steps should be followed at a bash shell prompt:
TroubleshootingIf 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:
|