summaryrefslogtreecommitdiff
path: root/software/mpu
diff options
context:
space:
mode:
Diffstat (limited to 'software/mpu')
-rw-r--r--software/mpu/Makefile49
1 files changed, 18 insertions, 31 deletions
diff --git a/software/mpu/Makefile b/software/mpu/Makefile
index 3c049b4..18d2058 100644
--- a/software/mpu/Makefile
+++ b/software/mpu/Makefile
@@ -23,6 +23,16 @@ ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
+# Linker extra options here.
+ifeq ($(USE_LDOPT),)
+ USE_LDOPT =
+endif
+
+# Enable this if you want link time optimizations (LTO)
+ifeq ($(USE_LTO),)
+ USE_LTO = no
+endif
+
# If enabled, this option allows to compile the application in THUMB mode.
ifeq ($(USE_THUMB),)
USE_THUMB = yes
@@ -59,20 +69,14 @@ else
endif
ifeq ($(MCU),cortex-m4)
- # Enables the use of FPU on Cortex-M4.
- # Enable this if you really want to use the STM FWLib.
+ # Enables the use of FPU on Cortex-M4 (no, softfp, hard).
ifeq ($(USE_FPU),)
- USE_FPU = yes
+ USE_FPU = no
endif
endif
BUILDDIR = build-$(MURSAT_TRGT)
-# Enable this if you really want to use the STM FWLib.
-ifeq ($(USE_FWLIB),)
- USE_FWLIB = no
-endif
-
#
# Architecture or project specific options
##############################################################################
@@ -85,7 +89,7 @@ endif
PROJECT = mpu
# Imported source files and paths
-CHIBIOS = ../../contrib/ChibiOS_2.6.2
+CHIBIOS = ../../contrib/ChibiOS_2.6.4
include board.mk
include $(CHIBIOS)/os/hal/platforms/$(STM_TYPE)/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
@@ -164,6 +168,7 @@ LD = $(TRGT)gcc
CP = $(TRGT)objcopy
AS = $(TRGT)gcc -x assembler-with-cpp
OD = $(TRGT)objdump
+SZ = $(TRGT)size
HEX = $(CP) -O ihex
BIN = $(CP) -O binary
@@ -188,7 +193,8 @@ CPPWARN = -Wall -Wextra
#
# List all default C defines here, like -D_DEBUG=1
-DDEFS =
+DDEFS = -DMURSAT_TRGT=$(MURSAT_TRGT) -DMCUCONF_INC=\"mcuconf-$(MURSAT_TRGT).h\"
+DDEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
# List all default ASM defines here, like -D_DEBUG=1
DADEFS =
@@ -229,24 +235,5 @@ ULIBS =
# End of user defines
##############################################################################
-DDEFS += -DMURSAT_TRGT=$(MURSAT_TRGT) -DMCUCONF_INC=\"mcuconf-$(MURSAT_TRGT).h\"
-
-ifeq ($(MCU),cortex-m4)
- ifeq ($(USE_FPU),yes)
- USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
- DDEFS += -DCORTEX_USE_FPU=TRUE
- else
- DDEFS += -DCORTEX_USE_FPU=FALSE
- endif
-endif
-
-DDEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
-
-ifeq ($(USE_FWLIB),yes)
- include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
- CSRC += $(STM32SRC)
- INCDIR += $(STM32INC)
- USE_OPT += -DUSE_STDPERIPH_DRIVER
-endif
-
-include $(CHIBIOS)/os/ports/GCC/ARMCMx/rules.mk
+RULESPATH = $(CHIBIOS)/os/ports/GCC/ARMCMx
+include $(RULESPATH)/rules.mk