-
Notifications
You must be signed in to change notification settings - Fork 0
/
stm32f334.gpr
59 lines (46 loc) · 1.99 KB
/
stm32f334.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
-- Add if you want to compile the runtime. You don't need this if you are using
-- the zfp-cortex-m4f from the Adacore Community compiler.
with "ADL/runtime/light-cortex-m4f/runtime_build.gpr";
with "ADL/ada_drivers_library.gpr";
project STM32F334 is
for Languages use ("Ada");
for Source_Dirs use ("src", "src/errors");
for Object_Dir use "obj";
for Exec_Dir use "exec";
for Create_Missing_Dirs use "True";
-- Executable files to choose:
-- test_led_pwm.adb, test_led_rt.adb, demo_inverter.adb, main.adb
for Main use ("main.adb");
-- Target architecture
for Target use "arm-eabi";
-- Generic ZFP run-time compatible with our MCU:
-- Use this if you are using the runtime from the GNAT FSF ARM compiler
-- for Runtime ("Ada") use "light-cortex-m4f";
-- Use this if you want to compile the runtime
for Runtime ("Ada") use Project'Project_Dir & "ADL/runtime/light-cortex-m4f";
package Compiler renames Ada_Drivers_Library.Compiler;
package Builder is
for Executable ("test_led_pwm.adb") use "led_pwm";
for Executable ("test_led_rt.adb") use "led_rt";
for Executable ("demo_inverter.adb") use "demo_inverter";
for Executable ("main.adb") use "inverter";
for Executable_Suffix use ".elf";
end Builder;
package Linker is
for Default_Switches ("Ada") use
("-Wl,--gc-sections", -- Don't link unused code sections
"-Wl,--print-gc-sections", -- List removed unused code sections
"-Wl,--print-memory-usage");
-- Linker script generated by startup-gen
for Switches ("Ada") use Linker'Default_Switches ("Ada") &
("-T", Project'Project_Dir & "ADL/src/link.ld");
end Linker;
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;
end STM32F334;