Getting Started with RTEMS for C/C++ Users
NOTE: The procedures described in the following sections must be completed before this step:
This section describes the process of building using the
bit
script. This script hides many of the details
of building the tools but can be a hindrance if you
encounter problems building the tools.
While in the tools
directory, unpack the compressed
tar file for the build tools using the following command sequence:
cd tools tar xzf ../archive/c_build_scripts-4.5.0.tgz
After the compressed tar file c_build_scripts-4.5.0.tgz has been unpacked, there
will be a set of scripts in the tools directory along with
any source code you have previously unarchived.
These scripts are intended to aid in building the tools and RTEMS.
These scripts may be used to automate the tool building process and hide
the invocation of configure
and make
from you. They are:
If bit
is executed later in this process,
it will automatically create this subdirectory:
At this point, the tree should look something like the following figure:
/whatever/prefix/you/choose/ archive/ gcc-2.95.2.tar.gz binutils-2.9.5.0.24.tar.gz newlib-1.8.2.tar.gz c_build_scripts-4.5.0.tgz gcc-2.95.2-rtems-20000606.diff.gz binutils-2.9.5.0.24-rtems-20000207.diff.gz newlib-1.8.2-rtems-20000606.diff.gz tools/ binutils-2.9.5.0.24/ gcc-2.95.2/ newlib-1.8.2/ bit bit_gdb bit_rtems common.sh user.cfg
Edit the user.cfg
file to alter the settings of various
variables which are used to tailor the build process.
Each of the variables set in user.cfg
may be modified
as described below:
INSTALL_POINT
WARNING: The INSTALL_POINT
should not be a subdirectory
under the build directory. The build directory will be removed
automatically upon successful completion of the build procedure.
BINUTILS
BINUTILS=binutils-2.9.5.0.24
GCC
GCC=gcc-2.95.2
GDB
GDB=gdb-4.18
NEWLIB
NEWLIB=newlib-1.8.2
BUILD_DOCS
BUILD_DOCS=yes
BUILD_OTHER_LANGUAGES
For example:
BUILD_OTHER_LANGUAGES=yes
NOTE: Based upon the version of the compiler being used, it may not be possible to build languages other than C and C++ cross. In many cases, the language run-time support libraries are not "multilib'ed". Thus the executable code in these libraries will be for the default compiler settings and not necessarily be correct for your CPU model.
The other variables in user.cfg
are RTEMS specific and are
not technically required to be set unless you build RTEMS using
the bit_rtems
script as described in
Using the bit_rtems Script. They are described in detail
in that section.
After the bit
script has been modified to reflect the
local installation, the modified bit
script is run
using the following sequence:
cd tools ./bit <target configuration>
Where <target configuration> is one of the following:
The build process can take a while to complete. Many users find it handy to run the build process in the background, capture the output in a file, and monitor the output. This can be done as follows:
./bit <target configuration> >bit.log 2>&1 & tail -f bit.log
If no errors are encountered, the bit
script will conclude by
printing messages similar to the following:
The build-i386-tools subdirectory may now be removed. Started: Fri Apr 10 10:14:07 CDT 1998 Finished: Fri Apr 10 12:01:33 CDT 1998
If the bit
script successfully completes, then the
GNU C/C++ cross compilation tools are installed.
If the bit
script does not successfully complete, then investigation
will be required to determine the source of the error.
Getting Started with RTEMS for C/C++ Users
Copyright © 1988-2000 OAR Corporation