aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_MSD/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_MSD/Makefile')
-rw-r--r--lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_MSD/Makefile226
1 files changed, 226 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_MSD/Makefile b/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_MSD/Makefile
new file mode 100644
index 000000000..d1efb2054
--- /dev/null
+++ b/lib/chibios-contrib/testhal/STM32/STM32F4xx/USB_MSD/Makefile
@@ -0,0 +1,226 @@
1##############################################################################
2# Build global options
3# NOTE: Can be overridden externally.
4#
5
6# Compiler options here.
7ifeq ($(USE_OPT),)
8 USE_OPT = -Os -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 = no
34endif
35
36# If enabled, this option allows to compile the application in THUMB mode.
37ifeq ($(USE_THUMB),)
38 USE_THUMB = yes
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 Cortex-M process stack. This stack is
61# the stack used by the main() thread.
62ifeq ($(USE_PROCESS_STACKSIZE),)
63 USE_PROCESS_STACKSIZE = 0x400
64endif
65
66# Stack size to the allocated to the Cortex-M main/exceptions stack. This
67# stack is used for processing interrupts and exceptions.
68ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
69 USE_EXCEPTIONS_STACKSIZE = 0x400
70endif
71
72# Enables the use of FPU (no, softfp, hard).
73ifeq ($(USE_FPU),)
74 USE_FPU = no
75endif
76
77# FPU-related options.
78ifeq ($(USE_FPU_OPT),)
79 USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv5-sp-d16 -fsingle-precision-constant
80endif
81
82#
83# Architecture or project specific options
84##############################################################################
85
86##############################################################################
87# Project, sources and paths
88#
89
90# Define project name here
91PROJECT = ch
92
93# Imported source files and paths
94CHIBIOS = ../../../../../ChibiOS
95CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
96
97# Licensing files.
98include $(CHIBIOS)/os/license/license.mk
99# Startup files.
100include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
101# HAL-OSAL files (optional).
102include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
103include $(CHIBIOS_CONTRIB)/os/hal/ports/STM32/STM32F4xx/platform.mk
104include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk
105include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk
106# RTOS files (optional).
107include $(CHIBIOS)/os/rt/rt.mk
108include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
109# Other files (optional).
110include $(CHIBIOS)/test/lib/test.mk
111include $(CHIBIOS)/test/rt/rt_test.mk
112include $(CHIBIOS)/test/oslib/oslib_test.mk
113include $(CHIBIOS)/os/hal/lib/streams/streams.mk
114include $(CHIBIOS)/os/various/shell/shell.mk
115
116# Define linker script file here
117LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
118
119# C sources that can be compiled in ARM or THUMB mode depending on the global
120# setting.
121CSRC = $(ALLCSRC) \
122 $(TESTSRC) \
123 $(CHIBIOS_CONTRIB)/os/various/ramdisk.c \
124 $(CHIBIOS_CONTRIB)/os/various/lib_scsi.c \
125 usbcfg.c \
126 main.c
127
128# C++ sources that can be compiled in ARM or THUMB mode depending on the global
129# setting.
130CPPSRC = $(ALLCPPSRC)
131
132# C sources to be compiled in ARM mode regardless of the global setting.
133# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
134# option that results in lower performance and larger code size.
135ACSRC =
136
137# C++ sources to be compiled in ARM mode regardless of the global setting.
138# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
139# option that results in lower performance and larger code size.
140ACPPSRC =
141
142# C sources to be compiled in THUMB mode regardless of the global setting.
143# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
144# option that results in lower performance and larger code size.
145TCSRC =
146
147# C sources to be compiled in THUMB mode regardless of the global setting.
148# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
149# option that results in lower performance and larger code size.
150TCPPSRC =
151
152# List ASM source files here
153ASMSRC = $(ALLASMSRC)
154ASMXSRC = $(ALLXASMSRC)
155
156INCDIR = $(ALLINC) $(TESTINC) \
157 $(CHIBIOS_CONTRIB)/os/various
158
159#
160# Project, sources and paths
161##############################################################################
162
163##############################################################################
164# Compiler settings
165#
166
167MCU = cortex-m4
168
169#TRGT = arm-elf-
170TRGT = arm-none-eabi-
171CC = $(TRGT)gcc
172CPPC = $(TRGT)g++
173# Enable loading with g++ only if you need C++ runtime support.
174# NOTE: You can use C++ even without C++ support if you are careful. C++
175# runtime support makes code size explode.
176LD = $(TRGT)gcc
177#LD = $(TRGT)g++
178CP = $(TRGT)objcopy
179AS = $(TRGT)gcc -x assembler-with-cpp
180AR = $(TRGT)ar
181OD = $(TRGT)objdump
182SZ = $(TRGT)size
183HEX = $(CP) -O ihex
184BIN = $(CP) -O binary
185
186# ARM-specific options here
187AOPT =
188
189# THUMB-specific options here
190TOPT = -mthumb -DTHUMB
191
192# Define C warning options here
193CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
194
195# Define C++ warning options here
196CPPWARN = -Wall -Wextra -Wundef
197
198#
199# Compiler settings
200##############################################################################
201
202##############################################################################
203# Start of user section
204#
205
206# List all user C define here, like -D_DEBUG=1
207UDEFS =
208
209# Define ASM defines here
210UADEFS =
211
212# List all user directories here
213UINCDIR =
214
215# List the user directory to look for the libraries here
216ULIBDIR =
217
218# List all user libraries here
219ULIBS =
220
221#
222# End of user defines
223##############################################################################
224
225RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk
226include $(RULESPATH)/rules.mk