source: rtems/doc/started/buildrt.t @ 874f9ed2

4.104.114.84.95
Last change on this file since 874f9ed2 was adee5979, checked in by Joel Sherrill <joel.sherrill@…>, on 05/04/00 at 19:45:17

Numerous changes based on comments from Stephan Wilms <Stephan.Wilms@…>
including a new section in the Getting Started called "Where to
Go From Here", lots of index entries added, and more configuration
table information.

  • Property mode set to 100644
File size: 4.3 KB
Line 
1@c
2@c
3@c  COPYRIGHT (c) 1988-1999.
4@c  On-Line Applications Research Corporation (OAR).
5@c  All rights reserved.
6@c
7@c  $Id$
8@c
9
10@chapter Building RTEMS
11
12@section Unpack the RTEMS Source
13
14Use the following command sequence to unpack the RTEMS source into the
15tools directory:
16
17@example
18cd tools
19tar xzf ../archive/@value{RTEMS-TAR}
20@end example
21
22@section Add <INSTALL_POINT>/bin to Executable PATH
23
24In order to compile RTEMS, you must have the cross compilation toolset
25in your search patch.  The following command appends the directory
26where the tools were installed in the previous chapter:
27
28@example
29export PATH=$PATH:<INSTALL_POINT>/bin
30@end example
31
32NOTE:  The above command is in Bourne shell (@code{sh}) syntax and
33should work with the Korn (@code{ksh}) and GNU Bourne Again Shell
34(@code{bash}).  It will not work with the C Shell (@code{csh}) or
35derivatives of the C Shell.
36
37@section Verifying the Operation of the Cross Toolset
38
39In order to insure that the cross-compiler is invoking the correct
40subprograms (like @code{as} and @code{ld}), one can test assemble
41a small program.  When in verbose more, @code{gcc} prints out information
42showing where it found the subprograms it invokes.  Place the following
43function in a file named @code{f.c}:
44
45@example
46int f( int x )
47@{
48  return x + 1;
49@}
50@end example
51
52Then assemble the file using a command similar to the following:
53
54@example
55m68k-rtems-gcc -v -S f.c
56@end example
57
58Where @code{m68k-rtems-gcc} should be changed to match the installed
59name of your cross compiler.  The result of this command will be
60a sequence of output showing where the cross-compiler searched for
61and found its subcomponents.  Verify that these paths correspond
62to your <INSTALL_POINT>.
63
64@b{NOTE:} One of the most common installation errors is for the
65cross-compiler not to be able to find the cross assembler and default
66to using the native @code{as}.  This can result in very confusing
67error messages.
68
69@section Generate RTEMS for a Specific Target and BSP
70
71@subsection Using the bit_rtems Script
72
73The simplest way to build RTEMS is to use the @code{bit_rtems} script.
74This script interprets the settings in the @code{user.cfg} file to
75enable or disable the various RTEMS options.
76
77This script is invoked as follows:
78
79@example
80./bit_rtems CPU [BSP]
81@end example
82
83Where CPU is one of the RTEMS supported CPU families from the following
84list:
85
86@itemize @bullet
87@item hppa1.1
88@item i386
89@item i386-elf
90@item i386-go32
91@item i960
92@item m68k
93@item mips64orion
94@item powerpc
95@item sh
96@item sparc
97@end itemize
98
99BSP is a supported BSP for the selected CPU family.  The list of
100supported BSPs may be found in the file
101tools/@value{RTEMS-UNTAR}/README.configure
102in the RTEMS source tree.  If the BSP parameter is not specified,
103then all supported BSPs for the selected CPU family will be built.
104
105@b{NOTE:}  The POSIX API must be enabled to use GNAT/RTEMS.
106
107@subsection Using the RTEMS configure Script Directly
108
109Make a build directory under tools and build the RTEMS product in this
110directory. The ../@value{RTEMS-UNTAR}/configure
111command has numerous command line
112arguments. These arguments are discussed in detail in documentation that
113comes with the RTEMS distribution. In the installation described in the
114section "Unpack the RTEMS source", these configuration options can be found
115in the file tools/@value{RTEMS-UNTAR}/README.configure.
116
117The GNAT/RTEMS run-time implementation is based on the POSIX API.  Thus
118the RTEMS configuration for a GNAT/RTEMS environment MUST include the
119@code{--enable-posix} flag.
120
121The following shows the command sequence required to configure,
122compile, and install RTEMS with the POSIX API, FreeBSD TCP/IP,
123and C++ support disabled.  RTEMS will be built to target
124the @code{BOARD_SUPPORT_PACKAGE} board.
125
126@example
127mkdir build-rtems
128cd build-rtems
129../@value{RTEMS-UNTAR}/configure --target=<TARGET_CONFIGURATION> \
130    --disable-posix --disable-tcpip --disable-cxx \
131    --enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
132    --prefix=<INSTALL_POINT>
133make all install
134@end example
135
136Where the list of currently supported of <TARGET_CONFIGURATION>'s and
137<BOARD_SUPPORT_PACKAGE>'s can be found in
138tools/@value{RTEMS-UNTAR}/README.configure.
139
140<INSTALL_POINT> is the installation point from the previous step
141"Modify the bit script" in the build of the tools.
142
143NOTE: The @code{make} utility used should be GNU make.
Note: See TracBrowser for help on using the repository browser.