[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Specifying the Run-Time Library and Target

This chapter describes how to select the run-time library and target that will be used to run your application code.

2.1 Selecting the Run-Time Library  
2.2 Specifying the Target  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Selecting the Run-Time Library

This section describes how to select the run-time library and applies to both bareboard targets and those targets with an operating system (e.g., VxWorks).

You select the run-time library for your application by specifying the library name that will be used by the tools. The name is that of a directory containing the run-time files and directories. (See J. Customized Run-Time Topics for those files and directories.)

The name will be a simple directory name, without a path, when specifying a run-time library located in a default location. Otherwise, you must specify a path to the named directory.

There are two ways to specify the run-time library name, depending upon where you do so. Within a project file, you specify the name via the Runtime attribute, as shown in the example below. Note the necessary inclusion of the language name as the index:

 
project Demo is
   ...
   for Runtime ("Ada") use "ravenscar-full-tms570";
   ...
end Demo;

This attribute within the gpr file is the preferred approach.

On the command line, you can use the `--RTS=' switch to specify the run-time library name. The switch can also appear in project files but the attribute is preferred.

The actual names vary by target and are discussed in the corresponding target-specific sections.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Specifying the Target

This section describes how to specify the target architecture for the platform on which your application will execute.

There are two ways to specify the target name, depending upon where you do so. Within a project file, you specify the name via the Target attribute, as shown in the example below:

 
project Demo is
   ...
   for Target use "arm-eabi";
   ...
end Demo;

This attribute within the gpr file is the preferred approach. Note the lack of an index, unlike the Runtime attribute.

On the command line, you can use the `--target' switch to specify the run-time library.

For example, the following shows an invocation of the builder for an ARM target, with the target specified on the command-line.

 
gprbuild --target=arm-eabi -P demo_leds.gpr

The names for the targets vary with the architecture of the intended platform, and are therefore discussed in their specific sections. Note that the names are reflected in the names of the cross-development versions of the AdaCore tools.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by GNAT Mailserver on October, 30 2014 using texi2html