Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 3.17 KB

INSTALL.md

File metadata and controls

96 lines (69 loc) · 3.17 KB

Installing and using FreeRTOS-Ada

FreeRTOS

This repository uses a Git submodule for FreeRTOS. If you want to use a stand-alone release of FreeRTOS, you'll need to edit FreeRTOS.gpr in the top-level directory to match. Otherwise, after cloning the repository,

git submodule init
git submodule update

Installing

The runtimes are supplied unbuilt. In order to build them, some scenario variables need to be set.

Compiler release

During compiler development, the interface between the compiler and the run time system it's generating code for changes.

Variable Default
RELEASE gcc12

Values for RELEASE are as below:

Compiler RELEASE=
FSF GCC 6 gcc6
FSF GCC 7 gcc7
FSF GCC 8 gcc8
FSF GCC 9 gcc8
FSF GCC 10 gcc8
FSF GCC 11 gcc11
FSF GCC 12 gcc12
FSF GCC 13 gcc12
FSF GCC 14 gcc12
GNAT GPL 2016 gcc6
GNAT GPL 2017 gnat-gpl-2017
GNAT CE 2018 gcc8
GNAT CE 2019 gcc8
GNAT CE 2020 gnat-ce-2020

Build by running make RELEASE=release all at the top level (or, if you only want one runtime, by make RELEASE=release in that runtime's subdirectory).

Installation

The runtimes must be installed. To install the runtime(s) with your compiler (you may need to use sudo),

make RELEASE=release INSTALL_LOCALLY=no install

either at top level for all runtimes, or in the individual runtime's subdirectory.

Local installation

It used to be possible to use a runtime from its build directory (for example, --RTS=$HOME/FreeRTOS-Ada/stm32f4), but this isn't possible with the new multi-release structure. Instead, the runtimes must be installed; local installation is the default.

Variable Default
INSTALL_LOCALLY yes
make RELEASE=release install

allowing --RTS=$HOME/FreeRTOS-Ada/local/stm32f4.

Using

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 and builder to gprbuild.

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

Target

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.

Run time system

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 external ("HOME") & "/FreeRTOS-Ada/local/stm32f4";