Remove the dependency over embedded-runtimes.

This build dependency won't work anymore with the next GNAT release as
runtimes will now require being installed into the compiler.

This commit also now generates automatically the board projects, to ease
the addition of new boards and runtimes, as well as taking into account
modifications refactoring of the library.
This commit is contained in:
Jerome Lambourg 2017-04-19 09:51:39 +02:00 committed by Fabien Chouteau
parent 2341eb5972
commit 1ee78d543f
56 changed files with 639 additions and 400 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "embedded-runtimes"]
path = embedded-runtimes
url = https://github.com/AdaCore/embedded-runtimes.git

View File

@ -1,14 +1,6 @@
[![Build Status](https://travis-ci.org/AdaCore/Ada_Drivers_Library.svg?branch=master)](https://travis-ci.org/AdaCore/Ada_Drivers_Library)
[![Build status](https://ci.appveyor.com/api/projects/status/dvay075xkwxgppwm?svg=true)](https://ci.appveyor.com/project/AdaCore/ada-drivers-library)
## Warning!
This repository uses git submodule, please clone with the `--recursive` option:
```shell
git clone --recursive https://github.com/AdaCore/Ada_Drivers_Library.git
```
# 1. Introduction
This repository contains Ada source code and complete sample GNAT projects for
@ -30,7 +22,6 @@ are available both for proprietary ("commercial") and non-proprietary use.
For details, see the `LICENSE` file in the root directory.
# 4. Requirements
The software is written in Ada 2012 and uses, for example, preconditions,
@ -49,7 +40,6 @@ compiler for ARM ELF is one such compiler [(Download it
here)](http://libre.adacore.com/download/configurations). A recent GNAT Pro
compiler for that target will also suffice.
# 5. Content
Initial provision is for the hardware in the STM32F4 family of 32-bit MCUs, as

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
with "../cortex_m/cortex_m0";
library project nRF51 is

View File

@ -1,5 +1,5 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
with "../../../../../boards/stm32f429_discovery_full.gpr";
project Demo_L3GD20_Dataready_Int extends "../../../../../examples/shared/common/common.gpr" is
@ -8,7 +8,7 @@ project Demo_L3GD20_Dataready_Int extends "../../../../../examples/shared/common
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
for Runtime ("Ada") use STM32F429_Discovery_Full'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is

View File

@ -1,5 +1,5 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
with "../../../../../boards/stm32f429_discovery_full.gpr";
project Demo_L3GD20_FIFO_Int extends "../../../../../examples/shared/common/common.gpr" is
@ -7,7 +7,7 @@ project Demo_L3GD20_FIFO_Int extends "../../../../../examples/shared/common/comm
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj/" & Common_Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
for Runtime ("Ada") use STM32F429_Discovery_Full'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is

View File

@ -1,5 +1,5 @@
with "../../../../../boards/common_config.gpr";
with "../../../../../boards/stm32f429_discovery.gpr";
with "../../../../../boards/stm32f429_discovery_full.gpr";
project Demo_L3GD20 extends "../../../../../examples/shared/common/common.gpr" is
@ -7,7 +7,7 @@ project Demo_L3GD20 extends "../../../../../examples/shared/common/common.gpr" i
for Main use ("demo_l3gd20.adb");
for Languages use ("Ada");
for Object_Dir use "obj/" & Common_Config.Build;
for Runtime ("Ada") use STM32F429_Discovery'Runtime("Ada");
for Runtime ("Ada") use STM32F429_Discovery_Full'Runtime("Ada");
-- for Create_Missing_Dirs use "true";
package Builder is

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
with "../cortex_m/cortex_m4f";
library project STM32F40x is

View File

@ -3,7 +3,7 @@
-- directory.
with "config";
with "../../hal/HAL";
with "hal/HAL";
with "../cortex_m/cortex_m4f";
library project STM32F427x is

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
with "../cortex_m/cortex_m4f";
library project STM32F42x is

View File

@ -1,6 +1,6 @@
with "config";
with "../../hal/HAL";
with "../../middleware/sdmmc";
with "hal/HAL";
with "middleware/sdmmc";
with "../cortex_m/cortex_m4f";
library project STM32F46_79x is

View File

@ -1,6 +1,6 @@
with "config";
with "../../hal/HAL";
with "../../middleware/sdmmc";
with "hal/HAL";
with "middleware/sdmmc";
with "../cortex_m/cortex_m7";
library project STM32F7x is

View File

@ -1,6 +1,6 @@
with "config";
with "../../hal/HAL";
with "../../middleware/sdmmc";
with "hal/HAL";
with "middleware/sdmmc";
with "../cortex_m/cortex_m7";
library project STM32F7x9 is

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
library project Cortex_M0 is

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
library project Cortex_M4 is

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
library project Cortex_M4F is

View File

@ -1,5 +1,5 @@
with "config";
with "../../hal/HAL";
with "hal/HAL";
library project Cortex_M7 is

View File

@ -1,16 +0,0 @@
-- Version of the projects configuration for Micro:Bit board.
abstract project Config extends "../common_config" is
RTS := "zfp-hifive1";
Build := Common_Config.Build;
Object_Subdir := "hifive1/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

6
boards/Makefile Normal file
View File

@ -0,0 +1,6 @@
all:
for gpr in *.gpr; do \
echo Building $$gpr; \
gprbuild -q -j0 -XPLATFORM_BUILD=Debug -P $$gpr -p; \
gprbuild -q -j0 -XPLATFORM_BUILD=Production -P $$gpr -p; \
done

View File

@ -1,16 +0,0 @@
-- Version of the projects configuration for Micro:Bit board.
abstract project Config extends "../common_config" is
RTS := "zfp-nRF51";
Build := Common_Config.Build;
Object_Subdir := "microbit/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for OpenMV2 board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-openmv2/ravenscar_build";
with "../../embedded-runtimes/ravenscar-openmv2/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "openmv2/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -1,6 +1,6 @@
-- This abstract project defines common scenario variables and switches used
-- all over the library.
abstract project Common_Config is
abstract project Config is
for Languages use ("Ada");
for Source_Dirs use ();
@ -9,6 +9,9 @@ abstract project Common_Config is
("Debug", "Production");
Build : BUILD_Type := external ("PLATFORM_BUILD", "Debug");
RTS := external ("RTS_Profile", "ravenscar-sfp");
Object_Subdir := external ("Obj_Suffix", "");
-- Target architecture
Target := Project'Target;
@ -21,6 +24,7 @@ abstract project Common_Config is
Callgraph_Switch := ("-fcallgraph-info=su");
end case;
package Compiler is
case Build is
when "Production" =>
@ -38,4 +42,4 @@ abstract project Common_Config is
package Builder is
end Builder;
end Common_Config;
end Config;

View File

@ -1,26 +1,26 @@
aggregate library project Crazyflie is
Build := external ("BUILD", "Debug");
Board := "crazyflie";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f407disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-stm32f4";
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("crazyflie");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("crazyflie/board.gpr");
for Library_Dir use "lib/crazyflie/" & RTS & "/" & Build;
for Library_Name use "crazyflie";
end Crazyflie;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for STM32F407-Discovery board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-stm32f407disco/ravenscar_build";
with "../../embedded-runtimes/ravenscar-stm32f407disco/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "stm32f407disco/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -1,19 +1,24 @@
aggregate library project Crazyflie_Full is
Build := external ("BUILD", "Debug");
for External ("RTS") use "ravenscar-full";
Board := "crazyflie";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f407disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-stm32f4";
for Runtime ("Ada") use RTS_Base & "/full";
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("crazyflie");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("crazyflie/board.gpr");
for Library_Dir use "lib/crazyflie/ravenscar-full/" & Build;
for Library_Name use "crazyflie";
end Crazyflie_Full;

24
boards/crazyflie_sfp.gpr Normal file
View File

@ -0,0 +1,24 @@
aggregate library project Crazyflie_SFP is
Board := "crazyflie";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-stm32f4";
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("crazyflie/board.gpr");
end Crazyflie_SFP;

113
boards/gen.py Executable file
View File

@ -0,0 +1,113 @@
#!/usr/bin/env python
BOARDS = {'Crazyflie': ['ravenscar-sfp', 'ravenscar-full'],
'HiFive1': ['zfp'],
'MicroBit': ['zfp'],
'Native': None,
'OpenMV2': ['ravenscar-sfp', 'ravenscar-full'],
'STM32F407Disco': ['ravenscar-sfp', 'ravenscar-full'],
'STM32F429Disco': ['ravenscar-sfp', 'ravenscar-full'],
'STM32F469Disco': ['ravenscar-sfp', 'ravenscar-full'],
'STM32F746Disco': ['ravenscar-sfp', 'ravenscar-full'],
'STM32F769Disco': ['ravenscar-sfp', 'ravenscar-full']}
FOLDERS = {'Crazyflie': 'crazyflie',
'HiFive1': 'hifive1',
'MicroBit': 'microbit',
'Native': 'native',
'OpenMV2': 'openmv2',
'STM32F407Disco': 'stm32f407_discovery',
'STM32F429Disco': 'stm32f429_discovery',
'STM32F469Disco': 'stm32f469_discovery',
'STM32F746Disco': 'stm32f746_discovery',
'STM32F769Disco': 'stm32f769_discovery'}
def gen_project(board, rts):
assert board is not None, "board is undefined"
project_name = FOLDERS[board].title()
if rts == 'zfp':
suffix = 'ZFP'
elif rts == 'ravenscar-sfp':
suffix = 'SFP'
elif rts == 'ravenscar-full':
suffix = 'Full'
elif rts is None:
suffix = None
else:
assert False, "Unexpected runtime %s" % rts
if suffix is not None:
project_name = '%s_%s' % (project_name, suffix)
cnt = 'aggregate library project %s is\n' % project_name
cnt += '\n'
lower = board.lower()
cnt += ' Board := "%s";\n\n' % lower
if BOARDS[board] is not None:
# Do not use a RTS Profile for the native project
if len(BOARDS[board]) == 1:
# Only one rts defined for the board, do not make it a user option
rts = BOARDS[board][0]
if rts is not None:
# Runtime profile is forced for this project
cnt += ' RTS_Profile := "%s";\n' % rts
else:
# Runtime profile is for the user to choose
cnt += ' type RTS_Profile_Type is ("%s");\n' % \
'", "'.join(BOARDS[board])
cnt += ' RTS_Profile : RTS_Profile_Type :=\n'
cnt += ' external ("RTS_Profile", "%s");\n' % \
BOARDS[board][0]
cnt += '\n'
cnt += ' type Build_Type is ("Debug", "Production");\n'
cnt += ' Build : Build_Type := external ("PLATFORM_BUILD", "Production");\n'
cnt += '\n'
# definition of the Target
if lower == 'native':
pass
else:
cnt += ' for Target use "arm-eabi";\n'
# definition of Runtime ("Ada")
if lower == 'native':
pass
elif lower in ('crazyflie', 'stm32f407disco'):
# Both use the stm32f4 runtime
cnt += ' for Runtime ("Ada") use RTS_Profile & "-stm32f4";\n'
else:
cnt += ' for Runtime ("Ada") use RTS_Profile & "-" & Board;\n'
cnt += '\n'
# Object subdirectories.
if lower == 'native':
cnt += ' Obj_Suffix := "native-" & Build;\n'
else:
cnt += ' Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;\n'
cnt += '\n'
cnt += ' for Library_Name use Board;\n'
cnt += ' for Library_Dir use "lib/" & Obj_Suffix;\n'
cnt += '\n'
cnt += ' for external ("Obj_Suffix") use Obj_Suffix;\n'
if lower != 'native':
cnt += ' for external ("RTS_Profile") use RTS_Profile;\n'
cnt += ' for Project_Path use \n'
cnt += ' (Project\'Project_Dir, Project\'Project_Dir & "..");\n'
cnt += ' for Project_Files use ("%s/board.gpr");\n' % FOLDERS[board]
cnt += '\n'
cnt += 'end %s;\n' % project_name
print "creating %s.gpr" % project_name.lower()
with open('%s.gpr' % project_name.lower(), 'w') as fp:
fp.write(cnt)
if __name__ == "__main__":
for b in BOARDS:
gen_project(b, None)
if BOARDS[b] is not None and len(BOARDS[b]) > 1:
for rts in BOARDS[b]:
gen_project(b, rts)

View File

@ -1,26 +1,24 @@
aggregate library project HiFive1 is
aggregate library project Hifive1 is
Build := external ("BUILD", "Debug");
Board := "hifive1";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
RTS_Profile := "zfp";
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/zfp-hifive1";
for Target use "riscv32-unknown-elf";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
for Project_Path use ("HiFive1");
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Files use ("HiFive1/board.gpr");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for Library_Dir use "lib/hifive1/" & RTS & "/" & Build;
for Library_Name use "hifive1";
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("hifive1/board.gpr");
end HiFive1;
end Hifive1;

View File

@ -1,26 +1,24 @@
aggregate library project MicroBit is
aggregate library project Microbit is
Build := external ("BUILD", "Debug");
Board := "microbit";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
RTS_Profile := "zfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/zfp-nRF51";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("OpenMV2");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for Project_Files use ("MicroBit/board.gpr");
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("microbit/board.gpr");
for Library_Dir use "lib/microbit/" & RTS & "/" & Build;
for Library_Name use "microbit";
end MicroBit;
end Microbit;

View File

@ -1,15 +1,19 @@
aggregate library project Native is
Build := external ("BUILD", "Debug");
Board := "native";
for Project_Path use ("native");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Project_Files use ("../hal/HAL.gpr",
"../components/components.gpr",
"../middleware/middleware.gpr",
"native/board.gpr");
for Library_Dir use "lib/native/" & Build;
for Library_Name use "native";
Obj_Suffix := "native-" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("native/board.gpr");
end Native;

View File

@ -1,14 +0,0 @@
abstract project Config extends "../common_config" is
RTS := "native";
Build := Common_Config.Build;
Object_Subdir := Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -1,26 +1,26 @@
aggregate library project OpenMV2 is
aggregate library project Openmv2 is
Build := external ("BUILD", "Debug");
Board := "openmv2";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-openmv2";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("OpenMV2");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for Project_Files use ("OpenMV2/board.gpr");
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("openmv2/board.gpr");
for Library_Dir use "lib/openmv2/" & RTS & "/" & Build;
for Library_Name use "openmv2";
end OpenMV2;
end Openmv2;

24
boards/openmv2_full.gpr Normal file
View File

@ -0,0 +1,24 @@
aggregate library project Openmv2_Full is
Board := "openmv2";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("openmv2/board.gpr");
end Openmv2_Full;

24
boards/openmv2_sfp.gpr Normal file
View File

@ -0,0 +1,24 @@
aggregate library project Openmv2_SFP is
Board := "openmv2";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("openmv2/board.gpr");
end Openmv2_SFP;

View File

@ -1,26 +1,26 @@
aggregate library project STM32F407_Discovery is
aggregate library project Stm32F407_Discovery is
Build := external ("BUILD", "Debug");
Board := "stm32f407disco";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f407disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-stm32f4";
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("stm32f407_discovery");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f407_discovery/board.gpr");
for Library_Dir use "lib/stm32f407disco/" & RTS & "/" & Build;
for Library_Name use "stm32f407disco";
end STM32F407_Discovery;
end Stm32F407_Discovery;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for STM32F407-Discovery board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-stm32f407disco/ravenscar_build";
with "../../embedded-runtimes/ravenscar-stm32f407disco/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "stm32f407disco/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F407_Discovery_Full is
Board := "stm32f407disco";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-stm32f4";
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f407_discovery/board.gpr");
end Stm32F407_Discovery_Full;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F407_Discovery_SFP is
Board := "stm32f407disco";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-stm32f4";
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f407_discovery/board.gpr");
end Stm32F407_Discovery_SFP;

View File

@ -1,26 +1,26 @@
aggregate library project STM32F429_Discovery is
aggregate library project Stm32F429_Discovery is
Build := external ("BUILD", "Debug");
Board := "stm32f429disco";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f429disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("stm32f429_discovery");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f429_discovery/board.gpr");
for Library_Dir use "lib/stm32f429disco/" & RTS & "/" & Build;
for Library_Name use "stm32f429disco";
end STM32F429_Discovery;
end Stm32F429_Discovery;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for STM32F429-Discovery board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-stm32f429disco/ravenscar_build";
with "../../embedded-runtimes/ravenscar-stm32f429disco/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "stm32f429disco/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F429_Discovery_Full is
Board := "stm32f429disco";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f429_discovery/board.gpr");
end Stm32F429_Discovery_Full;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F429_Discovery_SFP is
Board := "stm32f429disco";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f429_discovery/board.gpr");
end Stm32F429_Discovery_SFP;

View File

@ -1,26 +1,26 @@
aggregate library project STM32F469_Discovery is
aggregate library project Stm32F469_Discovery is
Build := external ("BUILD", "Debug");
Board := "stm32f469disco";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f469disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("stm32f469_discovery");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f469_discovery/board.gpr");
for Library_Dir use "lib/stm32f469disco/" & RTS & "/" & Build;
for Library_Name use "stm32f469disco";
end STM32F469_Discovery;
end Stm32F469_Discovery;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for STM32F469-Discovery board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-stm32f469disco/ravenscar_build";
with "../../embedded-runtimes/ravenscar-stm32f469disco/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "stm32f469disco/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F469_Discovery_Full is
Board := "stm32f469disco";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f469_discovery/board.gpr");
end Stm32F469_Discovery_Full;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F469_Discovery_SFP is
Board := "stm32f469disco";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f469_discovery/board.gpr");
end Stm32F469_Discovery_SFP;

View File

@ -1,27 +1,26 @@
aggregate library project STM32F746_Discovery is
aggregate library project Stm32F746_Discovery is
Build := external ("BUILD", "Debug");
Board := "stm32f746disco";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f746disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("stm32f746_discovery");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f746_discovery/board.gpr");
for Library_Dir use
"lib/stm32f746disco/" & RTS & "/" & Build;
for Library_Name use "stm32f746disco";
end STM32F746_Discovery;
end Stm32F746_Discovery;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for STM32F746G-Discovery board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-stm32f746disco/ravenscar_build";
with "../../embedded-runtimes/ravenscar-stm32f746disco/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "stm32f746disco/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F746_Discovery_Full is
Board := "stm32f746disco";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f746_discovery/board.gpr");
end Stm32F746_Discovery_Full;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F746_Discovery_SFP is
Board := "stm32f746disco";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f746_discovery/board.gpr");
end Stm32F746_Discovery_SFP;

View File

@ -1,26 +1,26 @@
aggregate library project STM32F769_Discovery is
aggregate library project Stm32F769_Discovery is
Build := external ("BUILD", "Debug");
Board := "stm32f769disco";
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
type RTS_Profile_Type is ("ravenscar-sfp", "ravenscar-full");
RTS_Profile : RTS_Profile_Type :=
external ("RTS_Profile", "ravenscar-sfp");
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
RTS_Base := Project'Project_Dir &
"../embedded-runtimes/ravenscar-stm32f769disco";
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
case RTS is
when "ravenscar-sfp" =>
for Runtime ("Ada") use RTS_Base & "/sfp";
when "ravenscar-full" =>
for Runtime ("Ada") use RTS_Base & "/full";
end case;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Project_Path use ("stm32f769_discovery");
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f769_discovery/board.gpr");
for Library_Dir use "lib/stm32f769disco/" & RTS & "/" & Build;
for Library_Name use "stm32f769disco";
end STM32F769_Discovery;
end Stm32F769_Discovery;

View File

@ -1,20 +0,0 @@
-- Version of the projects configuration for STM32F769-Discovery board.
-- Include the run-time project files to have them compiled
with "../../embedded-runtimes/ravenscar-stm32f769disco/ravenscar_build";
with "../../embedded-runtimes/ravenscar-stm32f769disco/runtime_build";
abstract project Config extends "../common_config" is
RTS := Runtime_Build.RTS;
Build := Common_Config.Build;
Object_Subdir := "stm32f769disco/" & RTS & "/" & Build;
-- Need that for abstract projects
for Source_Dirs use ();
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
end Config;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F769_Discovery_Full is
Board := "stm32f769disco";
RTS_Profile := "ravenscar-full";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f769_discovery/board.gpr");
end Stm32F769_Discovery_Full;

View File

@ -0,0 +1,24 @@
aggregate library project Stm32F769_Discovery_SFP is
Board := "stm32f769disco";
RTS_Profile := "ravenscar-sfp";
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("PLATFORM_BUILD", "Production");
for Target use "arm-eabi";
for Runtime ("Ada") use RTS_Profile & "-" & Board;
Obj_Suffix := Board & "/" & RTS_Profile & "/" & Build;
for Library_Name use Board;
for Library_Dir use "lib/" & Obj_Suffix;
for external ("Obj_Suffix") use Obj_Suffix;
for external ("RTS_Profile") use RTS_Profile;
for Project_Path use
(Project'Project_Dir, Project'Project_Dir & "..");
for Project_Files use ("stm32f769_discovery/board.gpr");
end Stm32F769_Discovery_SFP;

@ -1 +0,0 @@
Subproject commit 5cca89013958a14831ac029c60636c7c56bf8f5f

View File

@ -1,5 +1,5 @@
with "../../boards/openmv2";
with "../../boards/OpenMV2/config";
with "../../boards/config";
project OpenMV2_Example is

View File

@ -1,4 +1,4 @@
with "../../../boards/common_config";
with "../../../boards/config";
project Common is
@ -7,7 +7,7 @@ project Common is
LOADER : LOADER_Type := external ("LOADER", "ROM");
type RTS_Type is ("ravenscar-sfp", "ravenscar-full");
RTS : RTS_Type := External ("RTS", "ravenscar-sfp");
RTS : RTS_Type := External ("RTS_Profile", "ravenscar-sfp");
type LCH_Type is ("led", "lcd");
LCH : LCH_Type := external ("LCH", "led");
@ -35,12 +35,12 @@ project Common is
end case;
end case;
package Compiler renames Common_Config.Compiler;
package Builder renames Common_Config.Builder;
package Compiler renames Config.Compiler;
package Builder renames Config.Builder;
package Linker is
for Default_Switches ("Ada") use
("-Wl,--defsym=__stack_size=32768",
("-Wl,--defsym=__stack_size=32768",
"-Wl,--gc-sections",
"-Wl,--print-memory-usage");
end Linker;