-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrc_car.gpr
72 lines (53 loc) · 2.37 KB
/
rc_car.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
with "Ada_Drivers_Library/boards/stm32f407_discovery/stm32f407_discovery_full.gpr";
project RC_Car extends "Ada_Drivers_Library/examples/shared/common/common.gpr" is
for Runtime ("Ada") use STM32F407_Discovery_Full'Runtime("Ada");
-- "C:\GNATPRO\arm-elf\arm-eabi\lib\gnat\ravenscar-full-stm32f4"; -- full path for sake of CodePeer
type Build_Type is ("Production", "Debug");
App_BUILD : Build_Type := external ("APP_BUILD", "Production");
for Main use ("rc_car.adb");
for Languages use ("Ada");
for Source_Dirs use ("src\**",
"../Robotics_with_Ada/src/**");
for Object_Dir use "obj/" & App_BUILD;
for Target use "arm-eabi";
for Create_Missing_Dirs use "True";
type Remote_Controllers is
("AdaFruit_BLE_App",
"PF_IR_8879"); -- Power_Functions_IR_TX_8879, the one with two rotary switches
Remote : Remote_Controllers := External ("Remote_Control", "PF_IR_8879");
package Naming is
case Remote is
when "AdaFruit_BLE_App" =>
for spec ("hardware_Configuration") use "hardware_configuration_ble.ads";
for body ("Remote_Control") use "remote_control_adafruit_ble_app.adb";
when "PF_IR_8879" =>
for spec ("hardware_Configuration") use "hardware_configuration_ir.ads";
for body ("Remote_Control") use "remote_control_ir_pf8879.adb";
end case;
end Naming;
App_Switches := "";
package Compiler is
for Local_Configuration_Pragmas use "gnat.adc";
case App_BUILD is
when "Production" =>
App_Switches := ("-g", "-O3", "-gnatp", "-gnatn");
when "Debug" =>
App_Switches := ("-g", "-O0", "-gnata", "-fcallgraph-info=su");
end case;
for Default_Switches ("ada") use Compiler'Default_Switches ("Ada") &
App_Switches &
("-gnatwa", "-gnatQ", "-gnatw.X", "-gnaty", "-gnatyO", "-gnatyM120",
"-ffunction-sections", "-fdata-sections");
end Compiler;
package Ide is
for Gnat use "arm-eabi-gnat";
for Gnatlist use "arm-eabi-gnatls";
for Debugger_Command use "arm-eabi-gdb";
for Program_Host use "localhost:4242";
for Communication_Protocol use "remote";
for Connection_Tool use "st-util";
end Ide;
package CodePeer is
for Switches use ("-gnateT=" & project'Project_Dir & "/arm-elf-target.atp");
end CodePeer;
end RC_Car;