In texinfo nicely with all version dependent information

now in variables and some updates already in place.
This commit is contained in:
Joel Sherrill
1998-04-10 16:03:26 +00:00
parent 9c2b0879e2
commit bdec27096a
8 changed files with 349 additions and 181 deletions

View File

@@ -21,7 +21,7 @@ COMMON_FILES=../common/cpright.texi ../common/setup.texi
GENERATED_FILES= buildc.texi buildrt.texi gdb.texi intro.texi \
require.texi sample.texi
FILES= $(PROJECT).texi $(GENERATED_FILES)
FILES= $(PROJECT).texi versions.texi $(GENERATED_FILES)
INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
@@ -44,32 +44,32 @@ $(PROJECT).dvi: $(FILES)
$(TEXI2DVI) -v $(PROJECT).texi
texi2dvi -v $(PROJECT).texi
intro.texi: intro.t
intro.texi: intro.t versions.texi
$(BMENU) -c -p "Top" \
-u "Top" \
-n "Requirements" ${*}.t
require.texi: require.t
require.texi: require.t versions.texi
$(BMENU) -c -p "Introduction" \
-u "Top" \
-n "Building the GNU C/C++ Cross Compiler Toolset" ${*}.t
buildc.texi: buildc.t
buildc.texi: buildc.t versions.texi
$(BMENU) -c -p "Requirements" \
-u "Top" \
-n "Building RTEMS" ${*}.t
buildrt.texi: buildrt.t
buildrt.texi: buildrt.t versions.texi
$(BMENU) -c -p "GNU C/C++ cross compiler toolset complete" \
-u "Top" \
-n "Building the Sample Application" ${*}.t
sample.texi: sample.t
sample.texi: sample.t versions.texi
$(BMENU) -c -p "Generate RTEMS for a specific target and board support package" \
-u "Top" \
-n "Building the GNU Debugger" ${*}.t
gdb.texi: gdb.t
gdb.texi: gdb.t versions.texi
$(BMENU) -c -p "Application executable" \
-u "Top" \
-n "Command and Variable Index" ${*}.t

View File

@@ -8,40 +8,54 @@
@chapter Building the GNU C/C++ Cross Compiler Toolset
This chapter describes the steps required to acquire the
source code for a GNU cross compiler toolset, apply
any required RTEMS specific patches, compile that
toolset and install it.
@section Get all the pieces
The tree structure in the figure below is assumed to be present in the
following discussions:
@center @b{XXX directory tree figure goes here}
Gather the components that will be required for the installation and place
them in an archive directory. Call this directory arc. Be sure that there
is sufficient space to hold all necessary information. This will amount to
approximately 20 megabytes.
@subheading @value{GCC-VERSION}
@example
egcs 1.0.2
FTP Site: egcs.cygnus.com
Directory: /pub/egcs/releases/egcs-1.0.2
File: egcs-1.0.2-980309-prerelease.tar.gz
FTP Site: @value{GCC-FTPSITE}
Directory: @value{GCC-FTPDIR}
File: @value{GCC-TAR}
@end example
binutils 2.8.1
FTP Site: ftp.gnu.org
Directory: /pub/gnu
File: binutils-2.8.1.tar.gz
@subheading @value{BINUTILS-VERSION}
@example
FTP Site: @value{BINUTILS-FTPSITE}
Directory: @value{BINUTILS-FTPDIR}
File: @value{BINUTILS-TAR}
@end example
newlib 1.8.0
FTP Site: ftp.cygnus.com
Directory: /pub/newlib
File: newlib-1.8.0.tar.gz
@subheading @value{NEWLIB-VERSION}
@example
FTP Site: @value{NEWLIB-FTPSITE}
Directory: @value{NEWLIB-FTPDIR}
File: @value{NEWLIB-TAR}
@end example
RTEMS @value{version}
FTP Site: ftp.oarcorp.com
Directory: /oarcorp/private/snapshots
File: rtems-980219.tgz
@subheading @value{RTEMS-VERSION}
@example
FTP Site: @value{RTEMS-FTPSITE}
Directory: @value{RTEMS-FTPDIR}
File: @value{RTEMS-TAR}
File: bit
File: binutils-2.8.1-rtems-diff-971221.gz
File: newlib-1.8.0-diff.980120.gz
File: simple_app.tgz
File: @value{BINUTILS-RTEMSPATCH}
File: @value{NEWLIB-RTEMSPATCH}
File: @value{GCC-RTEMSPATCH}
File: hello_world_c.tgz
@end example
@@ -54,34 +68,45 @@ Unpack the compressed tar files using the following command sequence:
@example
cd tools
tar xzf ../arc/egcs-1.0.2-980309-prerelease.tar.gz
tar xzf ../arc/binutls-2.8.1.tar.gz
tar xzf ../arc/newlib-1.8.0.tar.gz
tar xzf ../arc/@value{GCC-TAR}
tar xzf ../arc/@value{BINUTILS-TAR}
tar xzf ../arc/@value{NEWLIB-TAR}
@end example
After the compressed tar files have been unpacked, the following
directories will have been created under tools.
@itemize @bullet
@item binutils-2.8.1
@item egcs-1.0.2
@item newlib-1.8.0
@item @value{BINUTILS-UNTAR}
@item @value{GCC-UNTAR}
@item @value{NEWLIB-UNTAR}
@end itemize
@section Apply patches for newlib
@c
@c EGCS patches
@c
Apply the patches using the following command sequence:
@section Apply RTEMS Patch to EGCS
@ifclear GCC-RTEMSPATCH
No RTEMS specific patches are required for @value{GCC-VERSION} to
support @value{RTEMS-VERSION}.
@end ifclear
@ifset GCC-RTEMSPATCH
Apply the patch using the following command sequence:
@example
cd tools/newlib-1.8.0
zcat arc/newlib-1.8.0-diff.980120.gz|patch -p1
cd tools/@value{GCC-UNTAR}
zcat arc/@value{GCC-RTEMSPATCH} | patch -p1
@end example
Check to see if any of these patches have been rejected using the following
sequence:
@example
cd tools/newlib-1.8.0
cd tools/@value{GCC-UNTAR}
find . -name "*.rej" -print
@end example
@@ -91,27 +116,38 @@ This should not happen with a good patch file.
To see the files that have been modified use the sequence:
@example
cd tools/newlib-1.8.0
cd tools/@value{GCC-UNTAR}
find . -name "*.orig" -print
@end example
The files that are found, have been modified by the patch file.
@end ifset
@section Apply patches for binutils
@c
@c BINUTILS patches
@c
Apply the patches using the following command sequence:
@section Apply RTEMS Patch to binutils
@ifclear BINUTILS-RTEMSPATCH
No RTEMS specific patches are required for @value{BINUTILS-VERSION} to
support @value{RTEMS-VERSION}.
@end ifclear
@ifset BINUTILS-RTEMSPATCH
Apply the patch using the following command sequence:
@example
cd tools/binutils-2.8.1
zcat arc/binutils-2.8.1-rtems-diff-971221.gz|patch -p1
cd tools/@value{BINUTILS-UNTAR}
zcat arc/@value{BINUTILS-RTEMSPATCH} | patch -p1
@end example
Check to see if any of these patches have been rejected using the following
sequence:
@example
cd tools/binutils-2.8.1
cd tools/@value{BINUTILS-UNTAR}
find . -name "*.rej" -print
@end example
@@ -121,17 +157,65 @@ This should not happen with a good patch file.
To see the files that have been modified use the sequence:
@example
cd tools/binutils-2.8.1
cd tools/@value{BINUTILS-UNTAR}
find . -name "*.orig" -print
@end example
The files that are found, have been modified by the patch file.
@end ifset
@c
@c Newlib patches
@c
@section Apply RTEMS Patch to newlib
@ifclear NEWLIB-RTEMSPATCH
No RTEMS specific patches are required for @value{NEWLIB-VERSION} to
support @value{RTEMS-VERSION}.
@end ifclear
@ifset NEWLIB-RTEMSPATCH
Apply the patch using the following command sequence:
@example
cd tools/@value{NEWLIB-UNTAR}
zcat arc/@value{NEWLIB-RTEMSPATCH} | patch -p1
@end example
Check to see if any of these patches have been rejected using the following
sequence:
@example
cd tools/@value{NEWLIB-UNTAR}
find . -name "*.rej" -print
@end example
If any files are found with the .rej extension, a patch has been rejected.
This should not happen with a good patch file.
To see the files that have been modified use the sequence:
@example
cd tools/@value{NEWLIB-UNTAR}
find . -name "*.orig" -print
@end example
The files that are found, have been modified by the patch file.
@end ifset
@c
@c Modify the bit script
@c
@section Modify the bit script
Copy the bit file from arc to the tools directory.
Copy the @code{bit} script from arc to the tools directory.
Edit the bit file to alter the following environmental variables:
Edit the @code{bit} file to alter the following environmental variables:
@itemize @bullet
@item INSTALL_POINT
@@ -139,6 +223,7 @@ Edit the bit file to alter the following environmental variables:
@item NEWLIB
@item GCC
@item BUILD_DOCS
@item BUILD_OTHER_LANGUAGES
@end itemize
These variables are located in the script section that resembles the
@@ -156,18 +241,20 @@ extract below:
# NEWLIB: Newlib source directory
# GCC: Newlib source directory
# BUILD_DOCS: Set to "yes" if you want to install documentation.
# BUILD_OTHER_LANGUAGES:
# Set to "yes" if you want to build Fortran and Objective-C
#
BINUTILS=gas-971208
GCC=egcs-1.0.1
NEWLIB=newlib-1.8.0
BINUTILS=@value{BINUTILS-UNTAR}
GCC=@value{GCC-UNTAR}
NEWLIB=@value{NEWLIB-UNTAR}
BUILD_DOCS=yes
BUILD_OTHER_LANGUAGES=yes
INSTALL_POINT=/home/joel/$@{GCC@}/$@{target@}
# USERCHANGE - uncomment this if you want to watch the commands.
@end example
Where:
Where each of the variables which may be modified is described below:
@table @code
@item INSTALL_POINT
@@ -177,50 +264,88 @@ these tools be named so that it is clear from which egcs distribution it
was generated and for which target system the tools are to produce code for.
@item BINUTILS
is the directory under tools that contains binutils-2.8.1.
BINUTILS=binutils-2.8.1
is the directory under tools that contains @value{BINUTILS-UNTAR}.
For example,
@example
BINUTILS=@value{BINUTILS-UNTAR}.
@end example
@item GCC
is the directory under tools that contains egcs-1.0.1.
GCC=egcs-1.0.2-980309-prerelease
is the directory under tools that contains @value{GCC-UNTAR}.
For example,
@example
GCC=@value{GCC-UNTAR}.
@end example
@item NEWLIB
is the directory under tools that contains newlib-1.8.0.
NEWLIB=newlib-1.8.0
is the directory under tools that contains @value{NEWLIB-UNTAR}.
For example,
@example
NEWLIB=@value{NEWLIB-UNTAR}.
@end example
@item BUILD_DOCS
is set to "yes" if you want to install documentation.
For example,
@example
BUILD_DOCS=yes
@end example
@item BUILD_OTHER_LANGUAGES
is set to "yes" if you want to build languages other than C and C++. At
the current time, this enables Fortan and Objective-C.
For example,
@example
BUILD_OTHER_LANGUAGES=yes
@end example
@end table
@section Running the bit script
Run the modified bit script using the following sequence:
After the @code{bit} script has been modified to reflect the
local installation, the modified @code{bit} script is run
using the following sequence:
@example
cd tools
./bit <target configuration>
@end example
Where:
Where <target configuration> is one of the following:
<target configuration> is one of the following:
@itemize @bullet
@item hppa1.1
@item i386
@item i386-elf
@item i386-go32
@item i960
@item m68k
@item mips64orion
@item powerpc
@item sh
@item sparc
@end itemize
If no errors are encountered, the @code{bit} script will conclude by
printing messages similar to the following:
@example
hppa1.1
i386
i386-elf
i386-go32
i960
m68k
mips64orion
powerpc
sh
sparc
The src and build-i386-tools subdirectory may now be removed.
Started: Fri Apr 10 10:14:07 CDT 1998
Finished: Fri Apr 10 12:01:33 CDT 1998
@end example
@section GNU C/C++ cross compiler toolset complete
If the @code{bit} script successfully completes, then the
GNU C/C++ cross compilation tools are installed.
At this point the GNU C/C++ cross compile tools should be built.
If the @code{bit} script does not successfully complete, then investigation
will be required to determine the source of the error.

View File

@@ -16,49 +16,53 @@ tools directory:
@example
cd tools
tar xzf ../arc/rtems-980219.tgz
tar xzf ../arc/@value{RTEMS-TAR}
@end example
@section Add the bin directory under the install point to the default PATH
Use the following command to append the <INSTALL_POINT>/bin directory to
the PATH variable:
In order to compile RTEMS, you must have the cross compilation toolset
in your search patch. The following command appends the directory
where the tools were installed in the previous chapter:
@example
PATH=$PATH:<INSTALL_POINT>/bin
export PATH=$PATH:<INSTALL_POINT>/bin
@end example
NOTE: The above command is in Bourne shell (@code{sh}) syntax and should work with
the Korn (@code{ksh}) and GNU Bourne Again Shell (@code{bash}). It will not
work with the C Shell (@code{csh})or derivatives of the C Shell.
@section Generate RTEMS for a specific target and board support package
Make a build directory under tools and build the RTEMS product in this
directory. The ../rtems-980219/configure command has numerous command line
directory. The ../@value{RTEMS-UNTAR}/configure
command has numerous command line
arguments. These arguments are discussed in detail in documentation that
comes with the RTEMS distribution. In the installation described in the
section "Unpack the RTEMS source", these configuration options can be found
in file:
in file tools/@value{RTEMS-UNTAR}/README.configure.
@example
tools/rtems-980219/README.configure
@end example
A simple example of the configuration appears below:
The following shows the command sequence required to configure,
compile, and install RTEMS with the POSIX API, KA9Q TCP/IP,
and C++ support disabled. RTEMS will be built to target
the @code{BOARD_SUPPORT_PACKAGE} board.
@example
mkdir build-rtems
cd build-rtems
../rtems-980219/configure --target=<TARGET_CONFIGURATION> \
--disable-posix --disable-ka9q --disable-cpp \
--enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
--prefix=< INSTALL_POINT>
../@value{RTEMS-UNTAR}/configure --target=<TARGET_CONFIGURATION> \
--disable-posix --disable-ka9q --disable-cxx \
--enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
--prefix=<INSTALL_POINT>
gmake all install
@end example
Where:
The current summary of <TARGET_CONFIGURATION>'s and
The list of currently supported of <TARGET_CONFIGURATION>'s and
<BOARD_SUPPORT_PACKAGE>'s can be found in
tools/rtems-980219/README.configure
tools/@value{RTEMS-UNTAR}/README.configure.
<INSTALL_POINT> is the installation point from the previous step
"Modify the bit script" in the build of the tools.

View File

@@ -9,22 +9,74 @@
@chapter Building the GNU Debugger
GDB is not currently RTEMS aware. The following configurations have been
successfully used with RTEMS applications.
successfully used with RTEMS applications:
@section GDB with Sparc Instruction Simulation (SIS)
@itemize bullet
@item Sparc Instruction Simulator (SIS)
@item PowerPC Instruction Simulator (PSIM)
@item DINK32
@end itemize
@subsection Unarchive the gdb distribution (SIS)
Other configurations of gdb have successfully been used by RTEMS users
but are not documented here.
@section Unarchive the gdb distribution
Use the following commands to unarchive the gdb distribution:
@example
cd tools
tar xzf ../arc/gdb-980122.tar.gz
tar xzf ../arc/@value{GDB-TAR}
@end example
The directory gdb-980122 is created under the tools directory.
@c
@c GDB Patch
@c
@subsection Make the build directory (SIS)
@section Apply RTEMS Patch to GDB
@ifclear GDB-RTEMSPATCH
No RTEMS specific patches are required for @value{GDB-VERSION} to
support @value{RTEMS-VERSION}.
@end ifclear
@ifset GDB-RTEMSPATCH
Apply the patch using the following command sequence:
@example
cd tools/@value{GDB-UNTAR}
zcat arc/@value{GDB-RTEMSPATCH} | patch -p1
@end example
Check to see if any of these patches have been rejected using the following
sequence:
@example
cd tools/@value{GDB-UNTAR}
find . -name "*.rej" -print
@end example
If any files are found with the .rej extension, a patch has been rejected.
This should not happen with a good patch file.
To see the files that have been modified use the sequence:
@example
cd tools/@value{GDB-UNTAR}
find . -name "*.orig" -print
@end example
The files that are found, have been modified by the patch file.
@end ifset
@section GDB with Sparc Instruction Simulation (SIS)
The directory @value{GDB-UNTAR} is created under the tools directory.
@subheading Make the build directory
Create a build directory for the SIS Debugger
@@ -33,48 +85,35 @@ cd tools
mkdir build-sis
@end example
@subsection Configure for the build (SIS)
@subheading Configure for the build
Configure the general gdb distribution for Sparc Instruction Simulation
Configure the GNU Debugger for the
Sparc Instruction Simulator (SIS):
@example
cd tools/build-sis
../gdb-980122/configure --target-sparc-erc32-aout \
--program-prefix=sparc-rtems- \
--disable-gdbtk \
--with-targets=all \
--prefix=<INSTALL_POINT_FOR_SIS>
../@value{GDB-UNTAR}/configure --target-sparc-erc32-aout \
--program-prefix=sparc-rtems- \
--disable-gdbtk \
--enable-targets=all \
--prefix=<INSTALL_POINT_FOR_SIS>
@end example
Where:
Where <INSTALL_POINT_FOR_SIS> is a unique location where the gdb
with SIS will be created.
<INSTALL_POINT_FOR_SIS> is a unique location where the gdb with SIS will be
created.
@subheading Make the debugger
@subsection Make the debugger (SIS)
From tools/build-sis run:
From tools/build-sis execute the following command sequence:
@example
gmake
gmake all install
@end example
@section GDB with PowerPC Instruction Simulator (PSIM)
@section GDB with PowerPC Instruction Simulator
@subsection Unarchive the gdb distribution (PSIM)
Use the following commands to unarchive the gdb distribution:
@example
cd tools
tar xzf ../arc/gdb-980122.tar.gz
@end example
The directory gdb-980122 is created under the tools directory.
@subsection Make the build directory (PSIM)
@subheading Make the build directory
Create a build directory for the SIS Debugger
@@ -83,52 +122,44 @@ cd tools
mkdir build-ppc
@end example
@subsection Configure for the build
@subheading Configure for the build
Configure the general gdb distribution for PowerPC Instruction Simulation
Configure the GNU Debugger for the PowerPC
Instruction Simulator (PSIM):
@example
cd tools/build-ppc
../gdb-980122/configure --host=i486-linux \
../@value{GDB-UNTAR}/configure \
--target=powerpc-unknown-eabi \
--program-prefix=powerpc-rtems- \
--enable-sim-powerpc \
--enable-sim-timebase \
--enable-sim-inline \
--enable-sim-hardware \
--prefix=<INSTALL_POINT_FOR_PPC>
--enable-targets=all \
--prefix=<INSTALL_POINT_FOR_PPC>
@end example
Where:
<INSTALL_POINT_FOR_PPC> is a unique location where the gdb with PSIM will
be created.
Where <INSTALL_POINT_FOR_PPC> is a unique location where the gdb
with PSIM will be created.
@subsection Make the debugger (PSIM)
@subheading Make the debugger
From tools/build-ppc run:
From tools/build-ppc execute the following command sequence:
@example
gmake
gmake all install
@end example
@section GDB with Dink32
@subsection Unarchive the gdb distribution (DINK32)
@subheading Unarchive the gdb distribution
Use the following commands to unarchive the gdb distribution:
@example
cd tools
tar xzf ../arc/gdb-980122.tar.gz
@end example
The directory gdb-980122 is created under the tools directory.
@subsection Make the build directory (DINK32)
@subheading Make the build directory
Create a build directory for the DINK32 Debugger
@@ -137,40 +168,27 @@ cd tools
mkdir build-dink32
@end example
@subsection Replace dink32-rom.c
@subheading Configure for the build
Obtain a valid copy of dink32-rom.c from RTEMS site.
Replace the copy of dink32-rom.c that came with the gdb-980122
distribution. It is located in:
@example
tools/gdb-980122/gdb/dink32-rom.c
@end example
@subsection Configure for the build (DINK32)
Configure the general gdb distribution for Sparc Instruction Simulation
Configure the GNU Debugger to communicate with
the DINK32 ROM monitor:
@example
cd tools/build-dink32
../gdb-980122/configure --target-powerpc-elf \
--program-prefix=powerpc-rtems- \
--prefix=<INSTALL_POINT_FOR_DINK32>
--with-targets=all \
../@value{GDB-UNTAR}/configure --target-powerpc-elf \
--program-prefix=powerpc-rtems- \
--enable-targets=all \
--prefix=<INSTALL_POINT_FOR_DINK32>
@end example
Where:
Where <INSTALL_POINT_FOR_DINK32> is a unique location where the
gdb Dink32 will be created.
<INSTALL_POINT_FOR_DINK32> is a unique location where the gdb Dink32 will
be created.
@subheading Make the debugger
@subsection Make the debugger (DINK32)
From tools/build-dink32 run:
From tools/build-dink32 execute the following command sequence:
@example
gmake
gmake all install
@end example

View File

@@ -8,6 +8,9 @@
@chapter Introduction
The purpose of this document is to guide you through the process of
installing a GNU cross development environment to use with RTEMS.
If you are already familiar with the concepts behind a cross compiler and
have a background in Unix these instructions should provide the bare
essentials for performing a setup of the following items:

View File

@@ -23,3 +23,14 @@ assessing the amount of disk space required for your installation:
+----------------------------------------+------------------------------+
@end example
The instructions in this manual should work on any computer running
a UNIX variant. Some native GNU tools are used by this procedure
including:
@itemize @bullet
@item GCC
@item GNU make
@end itemize
In addition, some native utilities may be deficient for building
the GNU tools.

View File

@@ -14,7 +14,7 @@ Use the following command to unarchive the sample application:
@example
cd tools
tar xzf ../arc/simple_app.tgz
tar xzf ../arc/hello_world_c.tgz
@end example
@section Set the environment variable RTEMS_MAKEFILE_PATH
@@ -29,28 +29,31 @@ export RTEMS_MAKEFILE_PATH = \
Where:
<INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> are those used in step 4.3
<INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> are those used when
configuring and installing RTEMS.
@section Build the Sample Application
Use the following command to start the build of the sample application:
@example
cd tools/simple_app
cd tools/hello_world_c
gmake
@end example
If no errors are detected during the sample application build, it is
reasonable to assume that the build of the GNU C/C++ Cross Compiler Tools
for RTEMS and the build of the RTEMS OS for the selected host and target
for RTEMS and RTEMS itself for the selected host and target
combination was done properly.
@section Application executable
If the application build has taken place without error, the application
If the sample application has successfully been build, then the application
executable is placed in the following directory:
@example
tools/simple_app/o-<BOARD_SUPPORT_PACKAGE>/<filename>.exe
@end example
How this executable is downloaded to the target board is very dependent
on the BOARD_SUPPORT_PACKAGE selected.

View File

@@ -21,11 +21,16 @@
@include ../common/setup.texi
@c
@c Now set all the tool version dependent information
@c
@include versions.texi
@ignore
@ifinfo
@format
START-INFO-DIR-ENTRY
* RTEMS Getting Started Guide (started):
* Getting Started with RTEMS for C/C++ Users (started):
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@@ -46,11 +51,11 @@ END-INFO-DIR-ENTRY
@c @shorttitlepage Getting Started with RTEMS
@setchapternewpage odd
@settitle Getting Started with RTEMS
@settitle Getting Started with RTEMS for C/C++ Users
@titlepage
@finalout
@title Getting Started with RTEMS
@title Getting Started with RTEMS for C/C++ Users
@subtitle Edition @value{edition}, for RTEMS @value{version}
@sp 1
@subtitle @value{update-month}
@@ -73,8 +78,7 @@ END-INFO-DIR-ENTRY
@node Top, Introduction, (dir), (dir)
@top started
This is the online version of the Getting Started with RTEMS for C/C++
Developers.
This is the online version of the Getting Started with RTEMS for C/C++ Users.
@menu
* Introduction::