The runtimes are supplied unbuilt.
In order to build them, run make RELEASE=release all at the top level (or, if you only want one runtime, run make RELEASE=release in that runtime's subdirectory).
The point of the RELEASE=release above is that, during compiler development, the interface between the compiler and the run time system it's generating code for changes.
Values for RELEASE
are as below:
Compiler | RELEASE= |
---|---|
FSF GCC 6 | gcc6 |
FSF GCC 7 | gcc7 |
FSF GCC 8 | gcc8 |
GNAT GPL 2016 | gcc6 |
GNAT GPL 2017 | gnat-gpl-2017 |
The runtimes must be installed. To install the runtime(s) with your compiler (you may need to use sudo
),
make RELEASE=release install
either at top level for all runtimes, or in the individual runtime's subdirectory.
It used to be possible to use a runtime from its build directory (for example, --RTS=$HOME/cortex-gnat-rts/stm32f4
), but this isn't possible with the new multi-release structure. Instead, the runtimes must be installed locally:
make RELEASE=release INSTALL_LOCALLY=yes install
allowing --RTS=$HOME/cortex-gnat-rts/local/stm32f4
.
You should always use gprbuild
and a GNAT Project (GPR) to do cross-builds. Gnatmake (arm-eabi-gnatmake
) doesn't work nearly so well, if at all.
-
For GPS, in Build>Settings>Targets, in the File tab change
gnatmake
andbuilder
togprbuild
. -
for Emacs ada-mode, in the Ada Build group,
- set Ada Build Check Cmd to
gprbuild -p -P${gpr_file} -c -u -f ${full_current}
- set Ada Build Make Cmd to
gprbuild -p -P${gpr_file}
- set Ada Build Check Cmd to
You need to specify the target (arm-eabi
). If you're only going to use the command line, you can specify --target=arm-eabi
on the command line, or in a GPR using the project-level attribute Target
:
for Target use "arm-eabi";
If you're going to use GPS or Emacs ada-mode, use the Target
attribute.
To use an RTS installed with the compiler, for example stm32f4
, you can specify it on the command line, using --RTS=stm32f4
, or with a recent gprbuild
in the project file:
for Runtime ("ada") use "stm32f4";
If using a locally-installed RTS, use a relative or absolute path:
for Runtime ("ada")
use Project’Project_Dir & "../local/stm32f4";