-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstm32f303.meson
142 lines (115 loc) · 3.15 KB
/
stm32f303.meson
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[binaries]
c = 'arm-none-eabi-gcc'
cpp = 'arm-none-eabi-g++'
ld = 'arm-none-eabi-ld'
ar = 'arm-none-eabi-ar'
as = 'arm-none-eabi-as'
size = 'arm-none-eabi-size'
objdump = 'arm-none-eabi-objdump'
objcopy = 'arm-none-eabi-objcopy'
strip = 'arm-none-eabi-strip'
gdb = 'arm-none-eabi-gdb'
terminal= 'x-terminal-emulator'
openocd = 'openocd'
# c = 'clang-5.0'
# cpp = 'clang++-5.0'
# ld = 'llvm-link-5.0'
# ar = 'llvm-ar-5.0'
# as = 'llvm-as-5.0'
# size = 'llvm-size-5.0'
# objdump = 'llvm-objdump-5.0'
[properties]
has_function_printf = false
size = 'arm-none-eabi-size'
objdump = 'arm-none-eabi-objdump'
objcopy = 'arm-none-eabi-objcopy'
strip = 'arm-none-eabi-strip'
gdb = 'arm-none-eabi-gdb'
terminal= 'x-terminal-emulator'
openocd = 'openocd'
c_args = [
##### CPU flags
'-mcpu=cortex-m4',
'-mthumb',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16',
##### Build/link flags
# Uninitialized global variables should not be common between object files
'-fno-common',
# Each function to a seperate section (Code-optimization / deletion)
'-ffunction-sections',
# each variable to a seperate section (Code-optimization / deletion)
'-fdata-sections',
##### libopencm3 flag
'-DSTM32F3',
##### Debugging
'-ggdb3',
##### Other flags ?
'-specs=nosys.specs',
# otherwise errors at linking...
'-fshort-enums',
# '-ffreestanding',
# Optimizations
'-Os',
]
cpp_args = [
##### CPU flags
'-mcpu=cortex-m4',
'-mthumb',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16',
##### Build/link flags
# Uninitialized global variables should not be common between object files
'-fno-common',
# Each function to a seperate section (Code-optimization / deletion)
'-ffunction-sections',
# each variable to a seperate section (Code-optimization / deletion)
'-fdata-sections',
# otherwise errors at linking...
'-fshort-enums',
##### libopencm3 flag
'-DSTM32F3',
##### Debugging
'-ggdb3',
##### Other flags ?
'-specs=nosys.specs',
# '-ffreestanding',
# Optimizations
'-Os',
]
# -nostartfiles -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16
# -specs=nano.specs -Wl,--gc-sections
# bin-stm32f4disco/main-stm32f4disco.o bin-stm32f4disco/usb-gadget0.o bin-stm32f4disco/trace.o
# bin-stm32f4disco/trace_stdio.o bin-stm32f4disco/delay.o
# -lopencm3_stm32f4 -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group
# -o usb-gadget0-stm32f4disco.elf
c_link_args = [
##### CPU flags
'-mcpu=cortex-m4',
'-mthumb',
'-mfloat-abi=hard',
'-mfpu=fpv4-sp-d16',
##### Build/link flags
# Uninitialized global variables should not be common between object files
'-fno-common',
# Each function to a seperate section (Code-optimization / deletion)
'-ffunction-sections',
# each variable to a seperate section (Code-optimization / deletion)
'-fdata-sections',
# otherwise errors at linking...
'-fshort-enums',
'-specs=nosys.specs',
'-nostartfiles',
'-Wl,--gc-sections',
# '-lnosys',
# '-lstdc++_nano',
# '-lm',
# '-lc',
# '-lg',
# '-lrdimon',
]
[host_machine]
system = 'none'
cpu_family = 'arm'
cpu = 'cortex-m4'
endian = 'little'