source: rtems/doc/started/sample.t @ 6b5a7b50

4.104.114.84.95
Last change on this file since 6b5a7b50 was 6b5a7b50, checked in by Ralf Corsepius <ralf.corsepius@…>, on Aug 7, 2003 at 5:07:43 AM

Merger from rtems-4-6-branch

  • Property mode set to 100644
File size: 3.9 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-2002.
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 Unarchive the Sample Application
12
13Use the following command to unarchive the sample application:
14
15@example
16cd tools
17tar xzf ../archive/hello_world_c.tgz
18@end example
19
20@section Set the Environment Variable RTEMS_MAKEFILE_PATH
21
22RTEMS_MAKEFILE_PATH must point to the appropriate directory containing
23RTEMS build for our target and board support package combination.
24
25@example
26export RTEMS_MAKEFILE_PATH=<INSTALLATION_POINT>/<BOARD_SUPPORT_PACKAGE>
27@end example
28
29Where <INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> are those used when
30configuring and installing RTEMS.
31
32NOTE:  In release 4.0, BSPs were installed at
33@code{<INSTALLATION_POINT>/rtems/<BOARD_SUPPORT_PACKAGE>}.  This
34was changed to be more in compliance with GNU standards.
35
36@section Build the Sample Application
37
38Use the following command to start the build of the sample hello
39world application:
40
41@example
42cd hello_world_c
43make
44@end example
45
46NOTE: GNU make is the preferred @code{make} utility.  Other @code{make}
47implementations may work but all testing is done with GNU make.
48
49If no errors are detected during the sample application build, it is
50reasonable to assume that the build of the GNU C/C++ Cross Compiler Tools
51for RTEMS and RTEMS itself for the selected host and target
52combination was done properly.
53
54@section Application Executable
55
56If the sample application has successfully been built, then the application
57executable is placed in the following directory:
58
59@example
60hello_world_c/o-optimize/<filename>.exe
61@end example
62
63How this executable is downloaded to the target board is very dependent
64on the BOARD_SUPPORT_PACKAGE selected.  The following is a list of
65commonly used BSPs classified by their RTEMS CPU family and pointers
66to instructions on how to use them.  [NOTE: All file names should be
67prepended with @value{RTEMS-UNTAR}/c/src/lib/libbsp.]
68
69@need 1000
70@table @b
71
72@item i386/pc386
73See @code{i386/pc386/HOWTO}
74
75@item i386/pc486
76The i386/pc386 BSP specially compiled for an i486-class CPU.
77
78@item i386/pc586
79The i386/pc386 BSP specially compiled for a Pentium-class CPU.
80
81@item i386/pc686
82The i386/pc386 BSP specially compiled for a Pentium II.
83
84@item i386/pck6
85The i386/pc386 BSP specially compiled for an AMD K6.
86
87@item m68k/gen68360
88This BSP is for a MC68360 CPU.  See @code{m68k/gen68360/README} for details.
89
90@item m68k/mvme162
91See @code{m68k/mvme162/README}.
92
93@item m68k/mvme167
94See @code{m68k/mvme167/README}.
95
96@item powerpc/mcp750
97See @code{powerpc/motorola_shared/README}.
98
99@item powerpc/mvme230x
100See @code{powerpc/motorola_shared/README.MVME2300}.
101
102@item powerpc/psim
103This is a BSP for the PowerPC simulator included with @code{powerpc-rtems-gdb}.
104The simulator is complicated to initialize by hand.  The user is referred
105to the script @code{powerpc/psim/tools/psim}.
106
107@item sparc/erc32
108The ERC32 is a radiation hardened SPARC V7.  This BSP can be used with
109either real ERC32 hardware or with the simulator included with
110@code{sparc-rtems-gdb}.  An application can be run on the simulator
111by executing the following commands upon entering @code{sparc-rtems-gdb}:
112
113@example
114target sim
115load
116run
117@end example
118
119@end table
120
121RTEMS has many more BSPs and new BSPs for commercial boards and CPUs
122with on-CPU peripherals are generally welcomed.
123
124@section More Information on RTEMS Application Makefiles
125
126The hello world sample application is a simple example of an
127RTEMS application that uses the RTEMS Application Makefile
128system.  This Makefile system simplifies building
129RTEMS applications by providing Makefile templates and
130capturing the configuration information used to build
131RTEMS specific to your BSP.  Building an RTEMS application
132for different BSPs is as simple as switching the
133setting of @code{RTEMS_MAKEFILE_PATH}.  This Makefile
134system is described in the file
135@code{make/README}.
Note: See TracBrowser for help on using the repository browser.