1. About This Guide

For ease of exposition, ‘GNAT Pro’ will generally be referred to simply as ‘GNAT’ in the remainder of this document.

This guide describes the use of GNAT, a compiler and software development toolset for the full Ada programming language, in a cross compilation environment. It supplements the information presented in the GNAT User’s Guide for Native Platforms. It describes the features of the compiler and tools, and details how to use them to build Ada applications that run on a target processor.

GNAT implements Ada 95, Ada 2005 and Ada 2012, and it may also be invoked in Ada 83 compatibility mode. By default, GNAT assumes Ada 2012, but you can override with a compiler switch to explicitly specify the language version. (Please refer to the section Compiling Different Versions of Ada in the GNAT User’s Guide for Native Platforms for details on these switches.) Throughout this manual, references to ‘Ada’ without a year suffix apply to all Ada 95/2005/2012 versions of the language.

This guide contains some basic information about using GNAT in any cross environment, but the main body of the document is a set of Appendices on topics specific to the various target platforms.

1.1. What This Guide Contains

This guide contains the following chapters:

  • Preliminary Note for Cross Platform Users describes the basic differences between the cross and native versions of GNAT.
  • Specifying the Run-Time Library and Target describes how to select the run-time library and target for your application code.
  • The Primary and Secondary Stacks describes the purposes of the two stacks and how to set their sizes.
  • The Predefined Profiles presents the different profiles (restricted feature sets) and their associated run-time libraries supported by GNAT Pro, depending on the target platform.
  • The GNAT Configurable Run Time Facility explains how to configure the GNAT run-time library or define a specific Ada feature profile based on application requirements.
  • Support for High-Integrity Systems describes both the general philosophy and specific features that relate to the use of GNAT Pro for software that has high assurance requirements, for example for safety or security.
  • VxWorks Topics presents information relevant to the various VxWorks targets for cross-compilation.
  • LynxOS and LynxOS-178 Topics presents information relevant to the LynxOS and LynxOS-178 targets for cross-compilation configurations.
  • Bareboard and Custom Kernel Topics describes how to build, load and run programs on a target without requiring the services of an underlying kernel.
  • Customized Run-Time Libraries presents information relevant to the customization of run-time libraries on bareboard targets.
  • ARM-ELF Topics and Tutorial describes topics specific to the use of bare-boards supporting ARM processors and presents a tutorial on how to build Ada applications that will run on a bareboard embedded ARM platform.
  • ERC32 / LEON / LEON3 Topics presents information relevant to the ERC32 / LEON / LEON3 targets for cross-compilation configurations.
  • PowerPC 55xx ELF Topics presents information relevant to the PowerPC 55xx ELF targets for cross-compilation configurations.
  • Cross Linux Topics presents information relevant to the Cross Linux targets for cross-compilation configurations.
  • PikeOS Topics presents information relevant to PikeOS targets for cross-compilation configurations.
  • iOS Topics describes how to set up a project for deployment on iOS devices, how to use GNAT Pro for iOS to include Ada code in an app, and how to build and deploy the app on the iOS simulator.
  • QNX Topics presents information relevant to QNX targets for cross-compilation configurations.

1.2. What You Should Know before Reading This Guide

This user’s guide assumes a basic familiarity with the Ada 95 language, as described in the International Standard ISO/IEC-8652:1995, January 1995. It does not require knowledge of the new features introduced by Ada 2005, (officially known as ISO/IEC 8652:1995 with Technical Corrigendum 1 and Amendment 1) or the features added by Ada 2012. All Ada reference manuals are included in the GNAT documentation package.

This user’s guide also assumes that you are familiar with the GNAT User’s Guide for Native Platforms, and that you know how to use GNAT on a native platform.

1.4. Conventions

Following are examples of the typographical and graphic conventions used in this guide:

  • Functions, utility program names, standard names, and classes.

  • Option flags

  • File names

  • Variables

  • Emphasis

  • [optional information or parameters]

  • Examples are described by text

    and then shown this way.
  • Commands that are entered by the user are shown as preceded by a prompt string consisting of the $ character followed by a space.

  • Full file names are shown with the ‘/’ character as the directory separator; e.g., parent-dir/subdir/myfile.adb. If you are using GNAT on a Windows platform, please note that the ‘\’ character should be used instead.