1 |
1026 |
ivang |
@c
|
2 |
|
|
@c COPYRIGHT (c) 1988-2002.
|
3 |
|
|
@c On-Line Applications Research Corporation (OAR).
|
4 |
|
|
@c All rights reserved.
|
5 |
|
|
@c
|
6 |
|
|
@c require.t,v 1.9 2002/01/17 21:47:46 joel Exp
|
7 |
|
|
@c
|
8 |
|
|
|
9 |
|
|
@chapter Requirements
|
10 |
|
|
|
11 |
|
|
A fairly large amount of disk space is required to perform the build of the
|
12 |
|
|
GNU C/C++ Cross Compiler Tools for RTEMS. The following table may help in
|
13 |
|
|
assessing the amount of disk space required for your installation:
|
14 |
|
|
|
15 |
|
|
@example
|
16 |
|
|
+------------------------------------+--------------------------+
|
17 |
|
|
| Component | Disk Space Required |
|
18 |
|
|
+------------------------------------+--------------------------+
|
19 |
|
|
| archive directory | 40 Mbytes |
|
20 |
|
|
| tools src unarchived | 200 Mbytes |
|
21 |
|
|
| each individual build directory | up to 500 Mbytes |
|
22 |
|
|
| each installation directory | 20-200 Mbytes |
|
23 |
|
|
+------------------------------------+--------------------------+
|
24 |
|
|
@end example
|
25 |
|
|
|
26 |
|
|
It is important to understand that the above requirements only address
|
27 |
|
|
the GNU C/C++ Cross Compiler Tools themselves. Adding additional
|
28 |
|
|
languages such as Fortran or Objective-C can increase the size
|
29 |
|
|
of the build and installation directories. Also, the unarchived
|
30 |
|
|
source and build directories can be removed after the tools are
|
31 |
|
|
installed.
|
32 |
|
|
|
33 |
|
|
After the tools themselves are installed, RTEMS must be built
|
34 |
|
|
and installed for each Board Support Package that you wish
|
35 |
|
|
to use. Thus the precise amount of disk space required
|
36 |
|
|
for each installation directory depends highly on the number
|
37 |
|
|
of RTEMS BSPs which are to be installed. If a single BSP is
|
38 |
|
|
installed, then the additional size of each install directory
|
39 |
|
|
will tend to be in the 40-60 Mbyte range.
|
40 |
|
|
|
41 |
|
|
There are a number of factors which must be taken into
|
42 |
|
|
account in oreder to estimate the amount of disk space required
|
43 |
|
|
to build RTEMS itself. Attempting to build multiple BSPs in
|
44 |
|
|
a single step increases the disk space requirements. Similarly
|
45 |
|
|
enabling optional features increases the build and install
|
46 |
|
|
space requirements. In particular, enabling and building
|
47 |
|
|
the RTEMS tests results in a significant increase in build
|
48 |
|
|
space requirements but since the test are not installed has
|
49 |
|
|
no impact on installation requirements.
|
50 |
|
|
|
51 |
|
|
The instructions in this manual should work on any computer running
|
52 |
|
|
a UNIX variant. Some native GNU tools are used by this procedure
|
53 |
|
|
including:
|
54 |
|
|
|
55 |
|
|
@itemize @bullet
|
56 |
|
|
@item GCC
|
57 |
|
|
@item GNAT
|
58 |
|
|
@item GNU make
|
59 |
|
|
@end itemize
|
60 |
|
|
|
61 |
|
|
In addition, some native utilities may be deficient for building
|
62 |
|
|
the GNU tools.
|
63 |
|
|
|
64 |
|
|
@section Native GNAT
|
65 |
|
|
|
66 |
|
|
The native GNAT must be installed in the default location or built
|
67 |
|
|
from source. No GCC or GNAT environment variables should be set during
|
68 |
|
|
the build or use of the cross GNAT/RTEMS toolset as this could result in
|
69 |
|
|
an unpredictable mix of native and cross toolsets.
|
70 |
|
|
|
71 |
|
|
Binaries for native GNAT installations are available at the primary
|
72 |
|
|
GNAT ftp site (@value{GNAT-FTP}. Installation instructions are
|
73 |
|
|
included with the binary GNAT distributions. The binary installation
|
74 |
|
|
should be installed in the default location or installed in a
|
75 |
|
|
non-default location and used ONLY to build a native GNAT from source.
|
76 |
|
|
This final native GNAT will be used to build the GNAT/RTEMS cross
|
77 |
|
|
development toolset.
|
78 |
|
|
|
79 |
|
|
@subsection Verifying Correct Operation of Native GNAT
|
80 |
|
|
|
81 |
|
|
It is imperative that the native GNAT installation work correctly for
|
82 |
|
|
the installation of GNAT/RTEMS to succeed. It is recommended that the
|
83 |
|
|
user verify that the native GNAT is installed correctly by performing
|
84 |
|
|
these tests:
|
85 |
|
|
|
86 |
|
|
@subsubsection Native Hello World Test
|
87 |
|
|
|
88 |
|
|
Place the following Ada source code in hello.adb:
|
89 |
|
|
|
90 |
|
|
@example
|
91 |
|
|
with Text_IO; use Text_IO;
|
92 |
|
|
|
93 |
|
|
procedure Hello is
|
94 |
|
|
begin
|
95 |
|
|
Put_Line ( "Hello World");
|
96 |
|
|
end Hello;
|
97 |
|
|
@end example
|
98 |
|
|
|
99 |
|
|
Use the following command sequence to ompile and execute the above program:
|
100 |
|
|
|
101 |
|
|
@example
|
102 |
|
|
gnatmake hello
|
103 |
|
|
./hello
|
104 |
|
|
@end example
|
105 |
|
|
|
106 |
|
|
If the message @code{Hello World} is printed, then the native installation
|
107 |
|
|
of GNAT operates well enough to proceed.
|
108 |
|
|
|
109 |
|
|
@subsubsection Insure GCC and GNAT Environment Variables Are Not Set
|
110 |
|
|
|
111 |
|
|
If any of the following commands produce output, then you have
|
112 |
|
|
environment variables overriding the default behavior of the
|
113 |
|
|
native GNAT toolset. These variables will conflict with the cross
|
114 |
|
|
toolset. Please resolve this problem before proceeding further.
|
115 |
|
|
|
116 |
|
|
@example
|
117 |
|
|
echo $GCC_EXEC_PREFIX
|
118 |
|
|
echo $ADA_INCLUDE_PATH
|
119 |
|
|
echo $ADA_OBJECTS_PATH
|
120 |
|
|
echo $LD_RUN_PATH
|
121 |
|
|
echo $C_INCLUDE_PATH
|
122 |
|
|
@end example
|