-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtarget_options.gpr
43 lines (35 loc) · 990 Bytes
/
target_options.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
abstract project Target_Options is
type Build_Type is ("Release", "Debug");
Build : Build_Type := external ("TARGET_BUILD", "Debug");
type Board_Type is ("atmega328p");
Board : Board_Type := external ("TARGET_BOARD", "atmega328p");
COMMON_FLAGS :=
("-fcallgraph-info=su,da",
"-ffunction-sections",
"-fdata-sections",
"-mmcu=" & Board);
ADA_FLAGS :=
("-gnatef",
"-fverbose-asm",
"-gnateDBOARD=" & Board);
case Build is
when "Release" =>
COMMON_FLAGS := COMMON_FLAGS &
("-Os");
ADA_FLAGS := ADA_FLAGS &
("-gnatp",
"-gnatVn",
"-gnatn2");
when "Debug" =>
COMMON_FLAGS := COMMON_FLAGS &
("-Og",
"-gdwarf-2");
end case;
ALL_ADA_FLAGS := COMMON_FLAGS & ADA_FLAGS;
BINDER_FLAGS :=
("-minimal");
LINKER_FLAGS :=
("-Wl,--relax",
"-Wl,--gc-sections",
"-mmcu=" & Board);
end Target_Options;