-
Notifications
You must be signed in to change notification settings - Fork 1
/
ada_motorcontrol.gpr
75 lines (60 loc) · 2.33 KB
/
ada_motorcontrol.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
with "./Ada_Drivers_Library/boards/config";
with "./Ada_Drivers_Library/boards/stm32f446_motorcontrol/stm32f446_motorcontrol_full.gpr";
project Ada_MotorControl is
for Runtime ("ada") use Stm32F446_Motorcontrol_Full'Runtime ("Ada");
for Target use "arm-eabi";
for Main use ("main.adb");
for Languages use ("Ada");
for Source_Dirs use ("src", "src/peripherals");
for Object_Dir use "obj";
for Create_Missing_Dirs use "True";
type Loader_Type is
("RAM", "ROM");
Loader : Loader_Type := external ("LOADER", "ROM");
type Build_Type is
("Debug", "Production");
Platform_Build : Build_Type := external ("PLATFORM_BUILD");
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
for Default_Switches ("ada") use ("--create-map-file");
end Builder;
package Compiler is
case Platform_Build is
when "Production" =>
for Default_Switches ("Ada") use
("-g", "-O3", "-gnatp", "-gnatn");
when "Debug" =>
for Default_Switches ("Ada") use
("-g", "-O0", "-gnata");
end case;
for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") &
("-gnatwa", "-gnatwe", "-gnatQ", "-gnatw.X", "-gnaty-s", "-gnatyO",
"-gnatyM120", "-ffunction-sections", "-fdata-sections");
end Compiler;
package Linker is
for Default_Switches ("ada") use ("-Wl,--gc-sections", "-Wl,--print-memory-usage");
end Linker;
package Ide is
for Program_Host use "localhost:4242";
for Communication_Protocol use "remote";
for Connection_Tool use "st-util";
case Platform_Build is
when "Debug" =>
case Loader is
when "RAM" =>
for Debugger_Command use "arm-eabi-gdb";
for Gnatlist use "arm-eabi-gnatls";
for Gnat use "arm-eabi-gnat";
when "ROM" =>
for Vcs_Kind use "['Auto', 'Mercurial', 'Subversion', 'Git', 'ClearCase Native', 'CVS']";
end case;
when "Production" =>
for Debugger_Command use "arm-eabi-gdb";
for Gnatlist use "arm-eabi-gnatls";
for Gnat use "arm-eabi-gnat";
end case;
end Ide;
package Documentation is
for Documentation_Dir use "doc/html";
end Documentation;
end Ada_MotorControl;