-
Notifications
You must be signed in to change notification settings - Fork 1
/
stm32_hal.gpr
130 lines (116 loc) · 5.27 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
with "config/stm32_hal_config.gpr";
project Stm32_Hal is
for Target use "arm-eabi";
Runtime_Device := "";
case stm32_hal_config.DEVICE is
when "stm32f407xx" =>
Runtime_Device := "stm32f4";
when "stm32f429" =>
Runtime_Device := "stm32f429disco";
when "stm32f746" =>
Runtime_Device := "stm32f746disco";
end case;
for Runtime ("Ada") use "light-tasking-" & Runtime_Device;
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/fmc/v1/",
"src/drivers/flash/v1/",
"src/drivers/device_id/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/sd/v1/sdmmc",
"src/drivers/sdram/v1/",
"src/drivers/rtc/v1/",
"src/drivers/spi/v1/",
"src/drivers/timers/v1/",
"src/drivers/usart/v1/",
"src/drivers/syscfg/v1/",
"src/drivers/exti/v1/");
when "stm32f429" =>
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/fmc/v1/",
"src/drivers/device_id/v1/",
"src/drivers/exti/v1/",
"src/drivers/gpio/v1/",
"src/drivers/ltdc/v1/",
"src/drivers/i2s/v1/",
"src/drivers/rng/v1/",
"src/drivers/crc/v1/",
"src/drivers/iwdg/v1/",
"src/drivers/pwm/v1/",
"src/drivers/syscfg/v1/",
"src/drivers/spi/v1/",
"src/drivers/sdram/v1/",
"src/drivers/rtc/v1/",
"src/drivers/timers/v1/",
"src/drivers/i2c/v2/",
"src/drivers/usarts/v2/",
"src/drivers/power_control/v2/",
"src/drivers/rcc/v2/");
when "stm32f407xx" =>
Drivers_Dirs := Drivers_Dirs &
("src/drivers/adc/v1/",
"src/drivers/dac/v1/",
"src/drivers/dma/v1/",
"src/drivers/dma_interrupts/v1/",
"src/drivers/device_id/v1/",
"src/drivers/exti/v1/",
"src/drivers/gpio/v1/",
"src/drivers/i2s/v1/",
"src/drivers/rng/v1/",
"src/drivers/crc/v1/",
"src/drivers/iwdg/v1/",
"src/drivers/pwm/v1/",
"src/drivers/syscfg/v1/",
"src/drivers/spi/v1/",
"src/drivers/rtc/v1/",
"src/drivers/timers/v1/",
"src/drivers/i2c/v2/",
"src/drivers/usarts/v2/",
"src/drivers/power_control/v2/",
"src/drivers/rcc/v2/",
"src/drivers/fsmc/v1/",
"src/drivers/sd/v1/",
"src/drivers/sd/v1/sdio");
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;