source: rtems/doc/started_ada/buildrt.t @ 0660b4f8

4.104.114.84.95
Last change on this file since 0660b4f8 was 0660b4f8, checked in by Joel Sherrill <joel.sherrill@…>, on 11/16/99 at 19:50:56

Changed copyright date to 1999.

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