-
Notifications
You must be signed in to change notification settings - Fork 2
/
hirtos.gpr
105 lines (91 loc) · 4.49 KB
/
hirtos.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
--
-- Copyright (c) 2022-2023, German Rivera
--
-- SPDX-License-Identifier: Apache-2.0
--
with "config/hirtos_config.gpr";
with "hirtos_compiler_flags.gpr";
with "third_party/portable_minimal_ada_rts/portable_minimal_ada_rts.gpr";
project HiRTOS is
for Target use HiRTOS_Compiler_Flags.Target_Compiler_Selector;
for Runtime ("Ada") use Portable_Minimal_Ada_Rts'Runtime ("Ada");
for Languages use ("Ada", "C", "Asm_Cpp");
for Library_Name use "HiRTOS";
for Library_Version use Project'Library_Name & ".a." & Hirtos_Config.Crate_Version;
for Source_Dirs use ("src",
"src/porting_layer/utils",
"src/porting_layer/cpu_architectures",
"src/porting_layer/cpu_architectures/" & HiRTOS_Compiler_Flags.CPU_Arch,
"src/porting_layer/platforms",
"src/porting_layer/platforms/" & Hirtos_Config.Platform & "/**",
"config");
for Object_Dir use "obj/" & HiRTOS_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 ("HIRTOS_LIBRARY_TYPE", external ("LIBRARY_TYPE", "static"));
for Library_Kind use Library_Type;
for Library_Standalone use "standard";
Platform_Specific_Interfaces := ();
case Hirtos_Config.Platform is
when "arm_fvp" =>
Platform_Specific_Interfaces := (
"HiRTOS_Cpu_Arch_Interface.Interrupt_Handling.Arch_Specific",
"HiRTOS_Cpu_Arch_Interface.Memory_Protection.EL1_MPU",
"HiRTOS_Cpu_Arch_Interface.System_Registers");
when "esp32_c3" =>
Platform_Specific_Interfaces := (
"Esp32_C3",
"Esp32_C3.uart");
when others =>
null;
end case;
for Library_Interface use ("Hirtos",
"HiRTOS_Config",
"HiRTOS_Config_Parameters",
"Generic_Execution_Stack",
"Generic_Linked_List",
"HiRTOS.Interrupt_Handling_Private",
"HiRTOS.Memory_Protection_Private",
"HiRTOS.Thread_Private",
"HiRTOS.Mutex_Private",
"HiRTOS.Condvar_Private",
"HiRTOS.Timer_Private",
"HiRTOS.RTOS_Private",
"HiRTOS.Memory_Protection",
"HiRTOS.Interrupt_Handling",
"HiRTOS.Debug",
"HiRTOS.Thread",
"HiRTOS.Timer",
"HiRTOS.Mutex",
"HiRTOS.Condvar",
"HiRTOS_Cpu_Arch_Parameters",
"HiRTOS_Platform_Parameters",
"HiRTOS_Cpu_Arch_Interface",
"HiRTOS_Cpu_Arch_Interface.Thread_Context",
"HiRTOS_Cpu_Arch_Interface.Interrupt_Handling",
"HiRTOS_Cpu_Arch_Interface.Memory_Protection",
"HiRTOS_Cpu_Arch_Interface.Interrupt_Controller",
"HiRTOS_Cpu_Arch_Interface.Interrupts",
"HiRTOS_Cpu_Arch_Interface.Tick_Timer",
"HiRTOS_Cpu_Arch_Interface_Private",
"HiRTOS_Cpu_Multi_Core_Interface",
"HiRTOS_Cpu_Startup_Interface",
"HiRTOS_Low_Level_Debug_Interface",
"Bit_Sized_Integer_Types",
"Memory_Utils",
"Number_Conversion_Utils",
"Uart_Driver") &
Platform_Specific_Interfaces;
for Library_Auto_Init use "False";
package Compiler is
for Default_Switches ("Ada") use HiRTOS_Config.Ada_Compiler_Switches &
HiRTOS_Compiler_Flags.Compiler.ADAFLAGS;
for Default_Switches ("C") use HiRTOS_Compiler_Flags.Compiler.COMMON_FLAGS;
for Default_Switches ("Asm_Cpp") use HiRTOS_Compiler_Flags.Compiler.COMMON_FLAGS;
end Compiler;
--package Builder is
-- for Global_Compilation_Switches ("Ada") use ("-gnateT=target.atp");
--end Builder;
end HIRTOS;