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:

  • Introduction to GNAT for Cross Platforms describes GNAT for cross platforms and the key concepts behind using GNAT in a cross environment.

  • The Primary and Secondary Stacks describes the purposes of the two stacks and how to set their sizes.

  • Predefined Profiles presents the different profiles (restricted feature sets).

  • Predefined GNAT Pro Run-Times presents the different run-time libraries provided by GNAT Pro.

  • 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 Certified Systems describes both the general philosophy and specific features that relate to the use of GNAT 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.

  • Deos Topics presents information relevant to the Deos targets for cross-compilation configurations.

  • Bareboard Topics describes how to build, load, and run programs on a target without requiring the services of an underlying kernel.

  • Customized Bareboard Run-Time Libraries presents information relevant to the customization of run-time libraries on bare-board targets.

  • ARM-ELF Topics and Tutorial describes topics specific to the use of bareboard platforms supporting ARM processors and presents a tutorial on how to build Ada applications that will run on such platforms.

  • ARM AArch64-ELF Topics describes topics relevant to bareboard AArch64 and also presents a tutorial on building, running, and debugging an Ada application on this platform.

  • LEON3 Topics presents information relevant to the LEON3 targets for cross-compilation configurations.

  • Morello ELF Topics describes topics relevant to bareboard Morello and also presents a tutorial on building, running, and debugging an Ada application on this platform.

  • RISC-V 32-Bit Topics and Tutorial describes topics relevant to GNAT for bareboard 32-bit RISC-V and also presents a tutorial on building, running, and debugging an Ada application on this platform.

  • RISC-V 64-Bit Topics and Tutorial describes topics relevant to GNAT for bareboard 64-bit RISC-V and also presents a tutorial on building, running, and debugging an Ada application on this platform.

  • x86_64 ELF Topics describes topics relevant to GNAT for bareboard Intel 64 and also presents a tutorial on building, running, and debugging an Ada application on this platform.

  • 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.

  • 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.