Changeset 6d3d425d in rtems


Ignore:
Timestamp:
Apr 11, 1998, 2:54:20 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
57a736ff
Parents:
5741c94
Message:

Now a passable Ada manual

Location:
doc/started_ada
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • doc/started_ada/Makefile

    r5741c94 r6d3d425d  
    5151
    5252require.texi: require.t versions.texi
    53         $(BMENU) -c -p "Introduction" \
     53        $(BMENU) -c -p "Cross Development" \
    5454            -u "Top" \
    5555            -n "Building the GNAT Cross Compiler Toolset" ${*}.t
    5656
    5757buildada.texi: buildada.t versions.texi
    58         $(BMENU) -c -p "Requirements" \
     58        $(BMENU) -c -p "Insure GCC and GNAT Environment Variables Are Not Set" \
    5959            -u "Top" \
    6060            -n "Building RTEMS" ${*}.t
    6161
    6262buildrt.texi: buildrt.t versions.texi
    63         $(BMENU) -c -p "Running the bit Script" \
     63        $(BMENU) -c -p "Running the bit_ada Script" \
    6464            -u "Top" \
    6565            -n "Building the Sample Application" ${*}.t
    6666
    6767sample.texi: sample.t versions.texi
    68         $(BMENU) -c -p "Generate RTEMS for a specific target and board support package" \
     68        $(BMENU) -c -p "Generate RTEMS for a Specific Target and BSP" \
    6969            -u "Top" \
    7070            -n "Building the GNU Debugger" ${*}.t
    7171
    7272gdb.texi: gdb.t versions.texi
    73         $(BMENU) -c -p "Application executable" \
     73        $(BMENU) -c -p "Application Executable" \
    7474            -u "Top" \
    7575            -n "" ${*}.t
  • doc/started_ada/buildada.t

    r5741c94 r6d3d425d  
    77@c
    88
    9 @chapter Building the GNU C/C++ Cross Compiler Toolset
     9@chapter Building the GNAT Cross Compiler Toolset
    1010
    1111This chapter describes the steps required to acquire the
     
    1414toolset and install it.
    1515
    16 @section Get all the pieces
     16@section Directory Organization
    1717
    1818The tree structure in the figure below is assumed to be present in the
    19 following discussions: 
     19following discussions:
    2020
    2121@center @b{XXX directory tree figure goes here}
     22
     23@section Get all the Pieces
    2224
    2325Gather the components that will be required for the installation and place
     
    3335@end example
    3436
     37@subheading @value{GNAT-VERSION}
     38@example
     39    FTP Site:    @value{GNAT-FTPSITE}
     40    Directory:   @value{GNAT-FTPDIR}
     41    File:        @value{GNAT-TAR}
     42@end example
     43
    3544@subheading @value{BINUTILS-VERSION}
    3645@example
     
    5261    Directory:   @value{RTEMS-FTPDIR}
    5362    File:        @value{RTEMS-TAR}
    54     File:        bit
     63    File:        bit_ada
     64@ifset BINUTILS-RTEMSPATCH
    5565    File:        @value{BINUTILS-RTEMSPATCH}
     66@end ifset
     67@ifset NEWLIB-RTEMSPATCH
    5668    File:        @value{NEWLIB-RTEMSPATCH}
     69@end ifset
     70@ifset GCC-RTEMSPATCH
    5771    File:        @value{GCC-RTEMSPATCH}
    58     File:        hello_world_c.tgz
    59 @end example
    60 
    61 
    62 @section Create the tools directory
     72@end ifset
     73@ifset GNAT-RTEMSPATCH
     74    File:        @value{GNAT-RTEMSPATCH}
     75@end ifset
     76    File:        hello_world_ada.tgz
     77@end example
     78
     79
     80@section Create the tools Directory
    6381
    6482Create a directory called tools that will serve as a working directory to
     
    7088cd tools
    7189tar xzf ../arc/@value{GCC-TAR}
     90tar xzf ../arc/@value{GNAT-TAR}
    7291tar xzf ../arc/@value{BINUTILS-TAR}
    7392tar xzf ../arc/@value{NEWLIB-TAR}
     
    8099@item @value{BINUTILS-UNTAR}
    81100@item @value{GCC-UNTAR}
     101@item @value{GNAT-UNTAR}
    82102@item @value{NEWLIB-UNTAR}
    83103@end itemize
    84104
    85105@c
    86 @c  EGCS patches
    87 @c
    88 
    89 @section Apply RTEMS Patch to EGCS
     106@c  GCC patches
     107@c
     108
     109@section Apply RTEMS Patch to GCC
    90110
    91111@ifclear GCC-RTEMSPATCH
     
    208228@end ifset
    209229
    210 @c
    211 @c  Modify the bit script
    212 @c
    213 
    214 @section Modify the bit Script
    215 
    216 Copy the @code{bit} script from arc to the tools directory.
    217 
    218 Edit the @code{bit} file to alter the following environmental variables:
     230@c 
     231@c  GNAT patches
     232@c
     233
     234@section Apply RTEMS Patch to GNAT
     235
     236@ifclear GNAT-RTEMSPATCH
     237No RTEMS specific patches are required for @value{GNAT-VERSION} to
     238support @value{RTEMS-VERSION}.
     239@end ifclear
     240
     241@ifset GNAT-RTEMSPATCH
     242
     243Apply the patch using the following command sequence:
     244
     245@example
     246cd tools/@value{GNAT-UNTAR}
     247zcat arc/@value{GNAT-RTEMSPATCH} | patch -p1
     248@end example
     249
     250Check to see if any of these patches have been rejected using the following
     251sequence:
     252
     253@example
     254cd tools/@value{GNAT-UNTAR}
     255find . -name "*.rej" -print
     256@end example
     257
     258If any files are found with the .rej extension, a patch has been rejected.
     259This should not happen with a good patch file.
     260
     261To see the files that have been modified use the sequence:
     262
     263@example
     264cd tools/@value{GNAT-UNTAR}
     265find . -name "*.orig" -print
     266@end example
     267
     268The files that are found, have been modified by the patch file.
     269
     270@end ifset
     271
     272@c
     273@c  Copy the ada directory
     274@c
     275
     276
     277@section Copy the ada Subdirectory to the GCC Source Tree
     278
     279Copy the ada subtree in the patched subtree of
     280tools/@value{GNAT-UNTAR}/src to the
     281tools/@value{GCC-UNTAR} directory:
     282
     283@example
     284cd tools/@value{GNAT-UNTAR}/src
     285cp -r ada ../../../@value{GCC-UNTAR}
     286@end example
     287
     288@c
     289@c  Modify the bit_ada script
     290@c
     291
     292@section Modify the bit_ada Script
     293
     294Copy the @code{bit_ada} script from arc to the tools directory.
     295
     296Edit the @code{bit_ada} file to alter the following environmental variables:
    219297
    220298@itemize @bullet
     
    224302@item GCC
    225303@item BUILD_DOCS
    226 @item BUILD_OTHER_LANGUAGES
    227304@end itemize
    228305
     
    242319#   GCC:          Newlib source directory
    243320#   BUILD_DOCS:   Set to "yes" if you want to install documentation.
    244 #   BUILD_OTHER_LANGUAGES:
    245 #                 Set to "yes" if you want to build Fortran and Objective-C
    246321#
    247322BINUTILS=@value{BINUTILS-UNTAR}
     
    249324NEWLIB=@value{NEWLIB-UNTAR}
    250325BUILD_DOCS=yes
    251 BUILD_OTHER_LANGUAGES=yes
    252326INSTALL_POINT=/home/joel/$@{GCC@}/$@{target@}
    253327
     
    296370@end example
    297371
    298 @item BUILD_OTHER_LANGUAGES
    299 is set to "yes" if you want to build languages other than C and C++.  At
    300 the current time, this enables Fortan and Objective-C.
    301 For example,
    302 
    303 @example
    304 BUILD_OTHER_LANGUAGES=yes
    305 @end example
    306 
    307372@end table
    308373
    309 @section Running the bit Script
    310 
    311 After the @code{bit} script has been modified to reflect the
    312 local installation, the modified @code{bit} script is run
     374@section Running the bit_ada Script
     375
     376After the @code{bit_ada} script has been modified to reflect the
     377local installation, the modified @code{bit_ada} script is run
    313378using the following sequence:
    314379
    315380@example
    316381cd tools
    317 ./bit <target configuration>
     382./bit_ada <target configuration>
    318383@end example
    319384
     
    333398@end itemize
    334399
    335 If no errors are encountered, the @code{bit} script will conclude by
     400NOTE:  The above list of target configurations is the list of RTEMS supported
     401targets.  Only a subset of these have been tested with GNAT/RTEMS.  For more
     402information, contact your GNAT/RTEMS representative.
     403
     404If no errors are encountered, the @code{bit_ada} script will conclude by
    336405printing messages similar to the following:
    337406
     
    344413@end example
    345414
    346 If the @code{bit} script successfully completes, then the
     415If the @code{bit_ada} script successfully completes, then the
    347416GNU C/C++ cross compilation tools are installed.
    348417
    349 If the @code{bit} script does not successfully complete, then investigation
     418If the @code{bit_ada} script does not successfully complete, then investigation
    350419will be required to determine the source of the error.
    351420
  • doc/started_ada/buildrt.t

    r5741c94 r6d3d425d  
    1010@chapter Building RTEMS
    1111
    12 @section Unpack the RTEMS source
     12@section Unpack the RTEMS Source
    1313
    1414Use the following command sequence to unpack the RTEMS source into the
     
    2020@end example
    2121
    22 @section Add the bin directory under the install point to the default PATH
     22@section Add <INSTALL_POINT>/bin to Executable PATH
    2323
    2424In order to compile RTEMS, you must have the cross compilation toolset
     
    3030@end example
    3131
    32 NOTE:  The above command is in Bourne shell (@code{sh}) syntax and should work with
    33 the Korn (@code{ksh}) and GNU Bourne Again Shell (@code{bash}).  It will not
    34 work with the C Shell (@code{csh})or derivatives of the C Shell.
     32NOTE:  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.
    3535
    36 @section Generate RTEMS for a specific target and board support package
     36@section Generate RTEMS for a Specific Target and BSP
    3737
    3838Make a build directory under tools and build the RTEMS product in this
     
    4444in file tools/@value{RTEMS-UNTAR}/README.configure.
    4545
     46The GNAT/RTEMS run-time implementation is based on the POSIX API.  Thus
     47the RTEMS configuration for a GNAT/RTEMS environment MUST include the
     48@code{--enable-posix} flag.
     49
    4650The following shows the command sequence required to configure,
    47 compile, and install RTEMS with the POSIX API, KA9Q TCP/IP,
    48 and C++ support disabled.  RTEMS will be built to target
    49 the @code{BOARD_SUPPORT_PACKAGE} board.
     51compile, and install RTEMS with the POSIX API enabled.
     52RTEMS will be built to target the @code{BOARD_SUPPORT_PACKAGE} board.
    5053
    5154@example
     
    5356cd build-rtems
    5457../@value{RTEMS-UNTAR}/configure --target=<TARGET_CONFIGURATION> \
    55     --disable-posix --disable-ka9q --disable-cxx \
     58    --enable-posix \
    5659    --enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
    5760    --prefix=<INSTALL_POINT>
     
    5962@end example
    6063
    61 Where:
    62 
    63 The list of currently supported of <TARGET_CONFIGURATION>'s and
     64Where the list of currently supported of <TARGET_CONFIGURATION>'s and
    6465<BOARD_SUPPORT_PACKAGE>'s can be found in
    6566tools/@value{RTEMS-UNTAR}/README.configure.
    6667
    6768<INSTALL_POINT> is the installation point from the previous step
    68 "Modify the bit script" in the build of the tools.
     69"Modify the bit_ada Script" in the build of the tools.
    6970
    7071
  • doc/started_ada/gdb.t

    r5741c94 r6d3d425d  
    2121but are not documented here.
    2222
    23 @section Unarchive the gdb distribution
     23@section Unarchive the gdb Distribution
    2424
    2525Use the following commands to unarchive the gdb distribution:
     
    3232The directory @value{GDB-UNTAR} is created under the tools directory.
    3333
    34 @c
    35 @c  GDB Patch
     34@c
     35@c  GDB GNAT Patch
     36@c
     37
     38@section Apply GNAT Patch to GDB
     39
     40@ifclear GDB-GNATPATCH
     41No GNAT specific patches are required for @value{GDB-VERSION} to
     42support @value{RTEMS-VERSION} and @value{GNAT-VERSION}.
     43@end ifclear
     44
     45@ifset GDB-GNATPATCH
     46
     47Apply the patch using the following command sequence:
     48
     49@example
     50cd tools/@value{GDB-UNTAR}
     51zcat arc/@value{GDB-GNATPATCH} | patch -p1
     52@end example
     53
     54Check to see if any of these patches have been rejected using the following
     55sequence:
     56
     57@example
     58cd tools/@value{GDB-UNTAR}
     59find . -name "*.rej" -print
     60@end example
     61
     62If any files are found with the .rej extension, a patch has been rejected.
     63This should not happen with a good patch file.
     64
     65To see the files that have been modified use the sequence:
     66
     67@example
     68cd tools/@value{GDB-UNTAR}
     69find . -name "*.orig" -print
     70@end example
     71
     72The files that are found, have been modified by the patch file.
     73
     74@end ifset
     75
     76@c
     77@c  GDB RTEMS Patch
    3678@c
    3779
     
    77119@section GDB with Sparc Instruction Simulation (SIS)
    78120
    79 @subheading Make the build directory
     121@subheading Make the Build Directory
    80122
    81123Create a build directory for the SIS Debugger
     
    86128@end example
    87129
    88 @subheading Configure for the build
     130@subheading Configure for the Build
    89131
    90132Configure the GNU Debugger for the
     
    103145with SIS will be created.
    104146
    105 @subheading Make the debugger
     147@subheading Make the Debugger
    106148
    107149From tools/build-sis execute the following command sequence:
     
    114156@section GDB with PowerPC Instruction Simulator
    115157
    116 @subheading Make the build directory
     158@subheading Make the Build Directory
    117159
    118160Create a build directory for the SIS Debugger
     
    123165@end example
    124166
    125 @subheading Configure for the build
     167@subheading Configure for the Build
    126168
    127169Configure the GNU Debugger for the PowerPC
     
    145187
    146188
    147 @subheading Make the debugger
     189@subheading Make the Debugger
    148190
    149191From tools/build-ppc execute the following command sequence:
     
    156198@section GDB for DINK32
    157199
    158 @subheading Unarchive the gdb distribution
    159 
    160 Use the following commands to unarchive the gdb distribution:
    161 
    162 @subheading Make the build directory
     200@subheading Make the Build Directory
    163201
    164202Create a build directory for the DINK32 Debugger
     
    169207@end example
    170208
    171 @subheading Configure for the build
     209@subheading Configure for the Build
    172210
    173211Configure the GNU Debugger to communicate with
     
    185223gdb Dink32 will be created.
    186224
    187 @subheading Make the debugger
     225@subheading Make the Debugger
    188226
    189227From tools/build-dink32 execute the following command sequence:
  • doc/started_ada/require.t

    r5741c94 r6d3d425d  
    3030@itemize @bullet
    3131@item GCC
     32@item GNAT
    3233@item GNU make
    3334@end itemize
     
    3536In addition, some native utilities may be deficient for building
    3637the GNU tools.
     38
     39@section Native GNAT
     40
     41The native GNAT must be installed in the default location or built
     42from source.  No GCC or GNAT environment variables should be set during
     43the build or use of the cross GNAT/RTEMS toolset as this could result in
     44an unpredictable mix of native and cross toolsets.
     45
     46Binaries for native GNAT installations are available at the primary
     47GNAT ftp site (@value{GNAT-FTP}.   Installation instructions are
     48included with the binary GNAT distributions.  The binary installation
     49should be installed in the default location or installed in a
     50non-default location and used ONLY to build a native GNAT from source.
     51This final native GNAT will be used to build the GNAT/RTEMS cross
     52development toolset.
     53
     54@subsection Verifying Correct Operation of Native GNAT
     55
     56It is imperative that the native GNAT installation work correctly for
     57the installation of GNAT/RTEMS to succeed.  It is recommended that the
     58user verify that the native GNAT is installed correctly by performing
     59these tests:
     60
     61@subsubsection Native Hello World Test
     62
     63Place the following Ada source code in hello.adb:
     64
     65@example
     66with Text_IO: use Text_IO;
     67
     68procedure Hello is
     69begin
     70   Put_Line ( "Hello World");
     71end Hello;
     72@end example
     73
     74Use the following command sequence to ompile and execute the above program:
     75
     76@example
     77gnatmake hello
     78./hello
     79@end example
     80
     81If the message @code{Hello World} is printed, then the native installation
     82of GNAT operates well enough to proceed.
     83
     84@subsubsection Insure GCC and GNAT Environment Variables Are Not Set
     85
     86If any of the following commands produce output, then you have
     87environment variables overriding the default behavior of the
     88native GNAT toolset.  These variables will conflict with the cross
     89toolset.  Please resolve this problem before proceeding further.
     90
     91@example
     92echo $GCC_EXEC_PREFIX
     93echo $ADA_INCLUDE_PATH
     94echo $ADA_OBJECTS_PATH
     95echo $LD_RUN_PATH
     96echo $C_INCLUDE_PATH
     97@end example
  • doc/started_ada/sample.t

    r5741c94 r6d3d425d  
    99@chapter Building the Sample Application
    1010
    11 @section Unpack the sample application
     11@section Unpack the Sample Application
    1212
    1313Use the following command to unarchive the sample application:
     
    1515@example
    1616cd tools
    17 tar xzf ../arc/hello_world_c.tgz
     17tar xzf ../arc/hello_world_ada.tgz
    1818@end example
    1919
    20 @section Set the environment variable RTEMS_MAKEFILE_PATH
     20@section Create a BSP Specific Makefile
    2121
    22 It must point to the appropriate directory containing RTEMS build for our
    23 target and board support package combination.
     22Provided are example Makefiles for multiple BSPs.  Copy one of these to
     23the file Makefile.<BOARD_SUPPORT_PACKAGE> and edit it as appropriate for
     24your local configuration.
    2425
    25 @example
    26 export RTEMS_MAKEFILE_PATH = \
    27 <INSTALLATION_POINT>/rtems/<BOARD_SUPPORT_PACKAGE>
    28 @end example
    29 
    30 Where:
    31 
    32 <INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> are those used when
     26Use the  <INSTALLATION_POINT> and <BOARD_SUPPORT_PACKAGE> specified when
    3327configuring and installing RTEMS.
    3428
     
    3832
    3933@example
    40 cd tools/hello_world_c
    41 gmake
     34cd tools/hello_world_ada
     35gmake -f Makefile.<BOARD_SUPPORT_PACKAGE>
    4236@end example
    4337
    44 If no errors are detected during the sample application build, it is
    45 reasonable to assume that the build of the GNU C/C++ Cross Compiler Tools
     38If the BSP specific modifications to the Makefile were correct and
     39no errors are detected during the sample application build, it is
     40reasonable to assume that the build of the GNAT/RTEMS Cross Compiler Tools
    4641for RTEMS and RTEMS itself for the selected host and target
    4742combination was done properly.
    4843
    49 @section Application executable
     44@section Application Executable
    5045
    5146If the sample application has successfully been build, then the application
     
    5348
    5449@example
    55 tools/simple_app/o-<BOARD_SUPPORT_PACKAGE>/<filename>.exe
     50tools/hello_world_ada/o-<BOARD_SUPPORT_PACKAGE>/<filename>.exe
    5651@end example
    5752
  • doc/started_ada/versions.texi

    r5741c94 r6d3d425d  
    2222@c
    2323
    24 @set GCC-VERSION     egcs 1.0.2
    25 @set GCC-TAR         egcs-1.0.2.tar.gz
    26 @set GCC-UNTAR       egcs-1.0.2
    27 @set GCC-FTPSITE     egcs.cygnus.com
    28 @set GCC-FTPDIR      /pub/egcs/releases/egcs-1.0.2
    29 @set GCC-RTEMSPATCH  egcs-1.0.2-rtems-diff-980331.gz
     24@set GCC-VERSION     gcc 2.8.1
     25@set GCC-TAR         gcc-2.8.1.tar.gz
     26@set GCC-UNTAR       gcc-2.8.1
     27@set GCC-FTPSITE     ftp.gnu.oar
     28@set GCC-FTPDIR      /pub/GNU
     29@set GCC-RTEMSPATCH  gcc-2.8.1-rtems-diff-980323.gz
     30
     31@c
     32@c  GNAT Version
     33@c
     34
     35@set GNAT-VERSION     gnat 3.10p
     36@set GNAT-TAR         gnat-3.10p.tar.gz
     37@set GNAT-UNTAR       gnat-3.10p-src
     38@set GNAT-FTPSITE     cs.nyu.edu
     39@set GNAT-FTPDIR      /pub/gnat
     40@set GNAT-RTEMSPATCH  gnat-3.10p-rtems-diff.971106.gz
    3041
    3142@c
     
    6980@set GDB-FTPSITE     ftp.cygnus.com
    7081@set GDB-FTPDIR      /private/gdb
    71 @set GDB-RTEMSPATCH  TBD
     82@set GDB-RTEMSPATCH  GDB-RTEMS-PATCH-TBD
     83@set GDB-GNATPATCH   GDB-GNAT-PATCH-TBD
    7284
    7385@c
Note: See TracChangeset for help on using the changeset viewer.