diff options
Diffstat (limited to 'lib/chibios/demos/various/RT-ARM7-GENERIC/Makefile')
-rw-r--r-- | lib/chibios/demos/various/RT-ARM7-GENERIC/Makefile | 243 |
1 files changed, 243 insertions, 0 deletions
diff --git a/lib/chibios/demos/various/RT-ARM7-GENERIC/Makefile b/lib/chibios/demos/various/RT-ARM7-GENERIC/Makefile new file mode 100644 index 000000000..ffbf049ad --- /dev/null +++ b/lib/chibios/demos/various/RT-ARM7-GENERIC/Makefile | |||
@@ -0,0 +1,243 @@ | |||
1 | ############################################################################## | ||
2 | # Build global options | ||
3 | # NOTE: Can be overridden externally. | ||
4 | # | ||
5 | |||
6 | # Compiler options here. | ||
7 | ifeq ($(USE_OPT),) | ||
8 | USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 | ||
9 | endif | ||
10 | |||
11 | # C specific options here (added to USE_OPT). | ||
12 | ifeq ($(USE_COPT),) | ||
13 | USE_COPT = | ||
14 | endif | ||
15 | |||
16 | # C++ specific options here (added to USE_OPT). | ||
17 | ifeq ($(USE_CPPOPT),) | ||
18 | USE_CPPOPT = -fno-rtti | ||
19 | endif | ||
20 | |||
21 | # Enable this if you want the linker to remove unused code and data | ||
22 | ifeq ($(USE_LINK_GC),) | ||
23 | USE_LINK_GC = yes | ||
24 | endif | ||
25 | |||
26 | # Linker extra options here. | ||
27 | ifeq ($(USE_LDOPT),) | ||
28 | USE_LDOPT = | ||
29 | endif | ||
30 | |||
31 | # Enable this if you want link time optimizations (LTO) | ||
32 | ifeq ($(USE_LTO),) | ||
33 | USE_LTO = yes | ||
34 | endif | ||
35 | |||
36 | # If enabled, this option allows to compile the application in THUMB mode. | ||
37 | ifeq ($(USE_THUMB),) | ||
38 | USE_THUMB = no | ||
39 | endif | ||
40 | |||
41 | # Enable this if you want to see the full log while compiling. | ||
42 | ifeq ($(USE_VERBOSE_COMPILE),) | ||
43 | USE_VERBOSE_COMPILE = no | ||
44 | endif | ||
45 | |||
46 | # If enabled, this option makes the build process faster by not compiling | ||
47 | # modules not used in the current configuration. | ||
48 | ifeq ($(USE_SMART_BUILD),) | ||
49 | USE_SMART_BUILD = yes | ||
50 | endif | ||
51 | |||
52 | # | ||
53 | # Build global options | ||
54 | ############################################################################## | ||
55 | |||
56 | ############################################################################## | ||
57 | # Architecture or project specific options | ||
58 | # | ||
59 | |||
60 | # Stack size to be allocated to the ARM System/User stack. This | ||
61 | # stack is the stack used by the main() thread. | ||
62 | ifeq ($(USE_SYSTEM_STACKSIZE),) | ||
63 | USE_SYSTEM_STACKSIZE = 0x400 | ||
64 | endif | ||
65 | |||
66 | # Stack size to the allocated to the ARM IRQ stack. This | ||
67 | # stack is used for processing interrupts and exceptions. | ||
68 | ifeq ($(USE_EXCEPTIONS_STACKSIZE),) | ||
69 | USE_IRQ_STACKSIZE = 0x400 | ||
70 | endif | ||
71 | |||
72 | # Stack size to the allocated to the ARM FIQ stack. This | ||
73 | # stack is used for processing interrupts and exceptions. | ||
74 | ifeq ($(USE_FIQ_STACKSIZE),) | ||
75 | USE_FIQ_STACKSIZE = 64 | ||
76 | endif | ||
77 | |||
78 | # Stack size to the allocated to the ARM Supervisor stack. This | ||
79 | # stack is used for processing interrupts and exceptions. | ||
80 | ifeq ($(USE_SUPERVISOR_STACKSIZE),) | ||
81 | USE_SUPERVISOR_STACKSIZE = 8 | ||
82 | endif | ||
83 | |||
84 | # Stack size to the allocated to the ARM Undefined stack. This | ||
85 | # stack is used for processing interrupts and exceptions. | ||
86 | ifeq ($(USE_UND_STACKSIZE),) | ||
87 | USE_UND_STACKSIZE = 8 | ||
88 | endif | ||
89 | |||
90 | # Stack size to the allocated to the ARM Abort stack. This | ||
91 | # stack is used for processing interrupts and exceptions. | ||
92 | ifeq ($(USE_ABT_STACKSIZE),) | ||
93 | USE_ABT_STACKSIZE = 8 | ||
94 | endif | ||
95 | |||
96 | # Enables the use of FPU. | ||
97 | ifeq ($(USE_FPU),) | ||
98 | USE_FPU = no | ||
99 | endif | ||
100 | |||
101 | # | ||
102 | # Architecture or project specific options | ||
103 | ############################################################################## | ||
104 | |||
105 | ############################################################################## | ||
106 | # Project, sources and paths | ||
107 | # | ||
108 | |||
109 | # Define project name here | ||
110 | PROJECT = ch | ||
111 | |||
112 | # Imported source files and paths | ||
113 | CHIBIOS = ../../.. | ||
114 | # Licensing files. | ||
115 | include $(CHIBIOS)/os/license/license.mk | ||
116 | # Startup files. | ||
117 | include $(CHIBIOS)/os/common/startup/ARM/compilers/GCC/mk/startup_lpc214x.mk | ||
118 | # HAL-OSAL files (optional). | ||
119 | #include $(CHIBIOS)/os/hal/hal.mk | ||
120 | #include $(CHIBIOS)/os/hal/ports/LPC/LPC214x/platform.mk | ||
121 | #include $(CHIBIOS)/os/hal/boards/OLIMEX_LPC_P2148/board.mk | ||
122 | #include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk | ||
123 | # RTOS files (optional). | ||
124 | include $(CHIBIOS)/os/rt/rt.mk | ||
125 | include $(CHIBIOS)/os/common/ports/ARM/compilers/GCC/mk/port_generic.mk | ||
126 | # Other files (optional). | ||
127 | #include $(CHIBIOS)/test/lib/test.mk | ||
128 | #include $(CHIBIOS)/test/rt/rt_test.mk | ||
129 | #include $(CHIBIOS)/test/oslib/oslib_test.mk | ||
130 | |||
131 | # Define linker script file here | ||
132 | LDSCRIPT= $(STARTUPLD)/LPC2148.ld | ||
133 | |||
134 | # C sources that can be compiled in ARM or THUMB mode depending on the global | ||
135 | # setting. | ||
136 | CSRC = $(ALLCSRC) \ | ||
137 | $(TESTSRC) \ | ||
138 | main.c | ||
139 | |||
140 | # C++ sources that can be compiled in ARM or THUMB mode depending on the global | ||
141 | # setting. | ||
142 | CPPSRC = $(ALLCPPSRC) | ||
143 | |||
144 | # C sources to be compiled in ARM mode regardless of the global setting. | ||
145 | # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler | ||
146 | # option that results in lower performance and larger code size. | ||
147 | ACSRC = | ||
148 | |||
149 | # C++ sources to be compiled in ARM mode regardless of the global setting. | ||
150 | # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler | ||
151 | # option that results in lower performance and larger code size. | ||
152 | ACPPSRC = | ||
153 | |||
154 | # C sources to be compiled in THUMB mode regardless of the global setting. | ||
155 | # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler | ||
156 | # option that results in lower performance and larger code size. | ||
157 | TCSRC = | ||
158 | |||
159 | # C sources to be compiled in THUMB mode regardless of the global setting. | ||
160 | # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler | ||
161 | # option that results in lower performance and larger code size. | ||
162 | TCPPSRC = | ||
163 | |||
164 | # List ASM source files here | ||
165 | ASMSRC = $(ALLASMSRC) | ||
166 | ASMXSRC = $(ALLXASMSRC) | ||
167 | |||
168 | INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) | ||
169 | |||
170 | # | ||
171 | # Project, sources and paths | ||
172 | ############################################################################## | ||
173 | |||
174 | ############################################################################## | ||
175 | # Compiler settings | ||
176 | # | ||
177 | |||
178 | MCU = arm7tdmi | ||
179 | |||
180 | #TRGT = arm-elf- | ||
181 | TRGT = arm-none-eabi- | ||
182 | CC = $(TRGT)gcc | ||
183 | CPPC = $(TRGT)g++ | ||
184 | # Enable loading with g++ only if you need C++ runtime support. | ||
185 | # NOTE: You can use C++ even without C++ support if you are careful. C++ | ||
186 | # runtime support makes code size explode. | ||
187 | LD = $(TRGT)gcc | ||
188 | #LD = $(TRGT)g++ | ||
189 | CP = $(TRGT)objcopy | ||
190 | AS = $(TRGT)gcc -x assembler-with-cpp | ||
191 | AR = $(TRGT)ar | ||
192 | OD = $(TRGT)objdump | ||
193 | SZ = $(TRGT)size | ||
194 | HEX = $(CP) -O ihex | ||
195 | BIN = $(CP) -O binary | ||
196 | |||
197 | # ARM-specific options here | ||
198 | AOPT = | ||
199 | |||
200 | # THUMB-specific options here | ||
201 | TOPT = -mthumb -DTHUMB | ||
202 | |||
203 | # Define C warning options here | ||
204 | CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes | ||
205 | |||
206 | # Define C++ warning options here | ||
207 | CPPWARN = -Wall -Wextra -Wundef | ||
208 | |||
209 | # | ||
210 | # Compiler settings | ||
211 | ############################################################################## | ||
212 | |||
213 | ############################################################################## | ||
214 | # Start of user section | ||
215 | # | ||
216 | |||
217 | # List all user C define here, like -D_DEBUG=1 | ||
218 | UDEFS = | ||
219 | |||
220 | # Define ASM defines here | ||
221 | UADEFS = | ||
222 | |||
223 | # List all user directories here | ||
224 | UINCDIR = | ||
225 | |||
226 | # List the user directory to look for the libraries here | ||
227 | ULIBDIR = | ||
228 | |||
229 | # List all user libraries here | ||
230 | ULIBS = | ||
231 | |||
232 | # | ||
233 | # End of user defines | ||
234 | ############################################################################## | ||
235 | |||
236 | RULESPATH = $(CHIBIOS)/os/common/startup/ARM/compilers/GCC | ||
237 | include $(RULESPATH)/rules.mk | ||
238 | |||
239 | ############################################################################## | ||
240 | # MISRA check rule, requires PCLint and the setup files, not provided. | ||
241 | # | ||
242 | misra: | ||
243 | @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(CSRC) &> misra.txt | ||