From b228e17215a83cf2af2c51b142badc7c1011c75d Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 14 May 2018 14:56:31 +0000 Subject: Fixed to be made also to other demos without HAL and backported. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12034 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- demos/various/RT-ARMCM4-GENERIC/Makefile | 84 +++++++++++++++++--------------- 1 file changed, 44 insertions(+), 40 deletions(-) (limited to 'demos/various/RT-ARMCM4-GENERIC/Makefile') diff --git a/demos/various/RT-ARMCM4-GENERIC/Makefile b/demos/various/RT-ARMCM4-GENERIC/Makefile index 8dd3ceb09..f0ad7f579 100644 --- a/demos/various/RT-ARMCM4-GENERIC/Makefile +++ b/demos/various/RT-ARMCM4-GENERIC/Makefile @@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),) USE_CPPOPT = -fno-rtti endif -# Enable this if you want the linker to remove unused code and data +# Enable this if you want the linker to remove unused code and data. ifeq ($(USE_LINK_GC),) USE_LINK_GC = yes endif @@ -28,7 +28,7 @@ ifeq ($(USE_LDOPT),) USE_LDOPT = endif -# Enable this if you want link time optimizations (LTO) +# Enable this if you want link time optimizations (LTO). ifeq ($(USE_LTO),) USE_LTO = yes endif @@ -74,6 +74,11 @@ ifeq ($(USE_FPU),) USE_FPU = no endif +# FPU-related options. +ifeq ($(USE_FPU_OPT),) + USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 -fsingle-precision-constant +endif + # # Architecture or project specific options ############################################################################## @@ -87,6 +92,12 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. +CONFDIR := ./cfg +BUILDDIR := ./build +DEPDIR := ./.dep + +# Licensing files. +include $(CHIBIOS)/os/license/license.mk # Startup files. include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk # HAL-OSAL files (optional). @@ -97,6 +108,8 @@ include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.m # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +# Auto-build files in ./source recursively. +include $(CHIBIOS)/tools/mk/autobuild.mk # Other files (optional). #include $(CHIBIOS)/test/lib/test.mk #include $(CHIBIOS)/test/rt/rt_test.mk @@ -107,19 +120,13 @@ LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CSRC = $(STARTUPSRC) \ - $(KERNSRC) \ - $(PORTSRC) \ - $(OSALSRC) \ - $(HALSRC) \ - $(PLATFORMSRC) \ - $(BOARDSRC) \ +CSRC = $(ALLCSRC) \ $(TESTSRC) \ main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. -CPPSRC = +CPPSRC = $(ALLCPPSRC) # C sources to be compiled in ARM mode regardless of the global setting. # NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler @@ -141,19 +148,39 @@ TCSRC = # option that results in lower performance and larger code size. TCPPSRC = -# List ASM source files here -ASMSRC = -ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) +# List ASM source files here. +ASMSRC = $(ALLASMSRC) +ASMXSRC = $(ALLXASMSRC) -INCDIR = $(CHIBIOS)/os/license \ - $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ - $(CHIBIOS)/os/various +INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC) # # Project, sources and paths ############################################################################## +############################################################################## +# Start of user section +# + +# List all user C define here, like -D_DEBUG=1 +UDEFS = -DSTM32F407xx + +# Define ASM defines here +UADEFS = -DSTM32F407xx + +# List all user directories here +UINCDIR = + +# List the user directory to look for the libraries here +ULIBDIR = + +# List all user libraries here +ULIBS = + +# +# End of user section +############################################################################## + ############################################################################## # Compiler settings # @@ -193,29 +220,6 @@ CPPWARN = -Wall -Wextra -Wundef # Compiler settings ############################################################################## -############################################################################## -# Start of user section -# - -# List all user C define here, like -D_DEBUG=1 -UDEFS = -DSTM32F407xx - -# Define ASM defines here -UADEFS = - -# List all user directories here -UINCDIR = - -# List the user directory to look for the libraries here -ULIBDIR = - -# List all user libraries here -ULIBS = - -# -# End of user defines -############################################################################## - RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk -- cgit v1.2.3