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