1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-1999. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter Building the Sample Application |
---|
10 | |
---|
11 | @section Unpack the Sample Application |
---|
12 | |
---|
13 | Use the following command to unarchive the sample application: |
---|
14 | |
---|
15 | @example |
---|
16 | cd tools |
---|
17 | tar xzf ../archive/hello_world_c.tgz |
---|
18 | @end example |
---|
19 | |
---|
20 | @section Set the Environment Variable RTEMS_MAKEFILE_PATH |
---|
21 | |
---|
22 | It must point to the appropriate directory containing RTEMS build for our |
---|
23 | target and board support package combination. |
---|
24 | |
---|
25 | @example |
---|
26 | export RTEMS_MAKEFILE_PATH = <INSTALLATION_POINT>/<BOARD_SUPPORT_PACKAGE> |
---|
27 | @end example |
---|
28 | |
---|
29 | Where <INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> are those used when |
---|
30 | configuring and installing RTEMS. |
---|
31 | |
---|
32 | NOTE: In release 4.0, BSPs were installed at |
---|
33 | @code{<INSTALLATION_POINT>/rtems/<BOARD_SUPPORT_PACKAGE>}. This |
---|
34 | was changed to be more in compliance with GNU standards. |
---|
35 | |
---|
36 | @section Build the Sample Application |
---|
37 | |
---|
38 | Use the following command to start the build of the sample application: |
---|
39 | |
---|
40 | @example |
---|
41 | cd tools/hello_world_c |
---|
42 | make |
---|
43 | @end example |
---|
44 | |
---|
45 | NOTE: GNU make is the preferred @code{make} utility. Other @code{make} |
---|
46 | implementations may work but all testing is done with GNU make. |
---|
47 | |
---|
48 | If no errors are detected during the sample application build, it is |
---|
49 | reasonable to assume that the build of the GNU C/C++ Cross Compiler Tools |
---|
50 | for RTEMS and RTEMS itself for the selected host and target |
---|
51 | combination was done properly. |
---|
52 | |
---|
53 | @section Application Executable |
---|
54 | |
---|
55 | If the sample application has successfully been build, then the application |
---|
56 | executable is placed in the following directory: |
---|
57 | |
---|
58 | @example |
---|
59 | tools/hello_world_c/o-optimize/<filename>.exe |
---|
60 | @end example |
---|
61 | |
---|
62 | How this executable is downloaded to the target board is very dependent |
---|
63 | on the BOARD_SUPPORT_PACKAGE selected. |
---|