forked from GNAT-Academic-Program/stm32_hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32_hal.gpr
63 lines (53 loc) · 2.39 KB
/
stm32_hal.gpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
with "config/stm32_hal_config.gpr";
project Stm32_Hal is
for Target use "arm-eabi";
for Runtime ("Ada") use "light-tasking-" & stm32_hal_config.DEVICE & "disco";
for Library_Name use "Stm32_Hal";
for Library_Version use Project'Library_Name & ".so." & Stm32_Hal_Config.Crate_Version;
SVD_Dirs := ("src/svd/" & stm32_hal_config.DEVICE & "/");
Drivers_Dirs := ("src/drivers/");
case stm32_hal_config.DEVICE is
when "stm32f746" =>
Drivers_Dirs := Drivers_Dirs &
("src/drivers/adc/v1/",
"src/drivers/dac/v1/",
"src/drivers/dma/v1/",
"src/drivers/dma_interrupts/v1/",
"src/drivers/dma2d/v1/",
"src/drivers/dma2d/v1/",
"src/drivers/fmc/v1/",
"src/drivers/gpio/v1/",
"src/drivers/ltdc/v1/",
"src/drivers/power_control/v1/",
"src/drivers/i2c/v1/",
"src/drivers/i2s/v1/",
"src/drivers/rcc/v1/",
"src/drivers/rng/v1/",
"src/drivers/sai/v1/",
"src/drivers/sd/v1/",
"src/drivers/sdram/v1/",
"src/drivers/rtc/v1/",
"src/drivers/spi/v1/",
"src/drivers/timers/v1/",
"src/drivers/syscfg/v1/",
"src/drivers/exti/v1/");
end case;
Device_Dirs := ("src/devices/" & stm32_hal_config.DEVICE & "/");
for Source_Dirs use ("config/") & SVD_Dirs & Drivers_Dirs & Device_Dirs;
for Object_Dir use "obj/" & Stm32_Hal_Config.Build_Profile;
for Create_Missing_Dirs use "True";
for Library_Dir use "lib";
type Library_Type_Type is ("relocatable", "static", "static-pic");
Library_Type : Library_Type_Type :=
external ("STM32_HAL_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static"));
for Library_Kind use Library_Type;
package Compiler is
for Default_Switches ("Ada") use Stm32_Hal_Config.Ada_Compiler_Switches;
end Compiler;
package Binder is
for Switches ("Ada") use ("-Es"); -- Symbolic traceback
end Binder;
package Install is
for Artifacts (".") use ("share");
end Install;
end Stm32_Hal;