aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/chibios.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/chibios.mk')
-rw-r--r--tmk_core/chibios.mk28
1 files changed, 12 insertions, 16 deletions
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index d0f1032ac..09aaddeef 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -220,6 +220,18 @@ COMPILEFLAGS += -fno-common
220COMPILEFLAGS += -fshort-wchar 220COMPILEFLAGS += -fshort-wchar
221COMPILEFLAGS += $(THUMBFLAGS) 221COMPILEFLAGS += $(THUMBFLAGS)
222 222
223# FPU options default (Cortex-M4 and Cortex-M7 single precision).
224USE_FPU_OPT ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant
225
226# FPU-related options
227USE_FPU ?= no
228ifneq ($(USE_FPU),no)
229 COMPILEFLAGS += $(USE_FPU_OPT)
230 OPT_DEFS += -DCORTEX_USE_FPU=TRUE
231else
232 OPT_DEFS += -DCORTEX_USE_FPU=FALSE
233endif
234
223CFLAGS += $(COMPILEFLAGS) 235CFLAGS += $(COMPILEFLAGS)
224 236
225ASFLAGS += $(THUMBFLAGS) 237ASFLAGS += $(THUMBFLAGS)
@@ -241,22 +253,6 @@ OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1
241 253
242MCUFLAGS = -mcpu=$(MCU) 254MCUFLAGS = -mcpu=$(MCU)
243 255
244# FPU options default (Cortex-M4 and Cortex-M7 single precision).
245ifeq ($(USE_FPU_OPT),)
246 USE_FPU_OPT = -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 -fsingle-precision-constant
247endif
248
249# FPU-related options
250ifeq ($(USE_FPU),)
251 USE_FPU = no
252endif
253ifneq ($(USE_FPU),no)
254 OPT += $(USE_FPU_OPT)
255 OPT_DEFS += -DCORTEX_USE_FPU=TRUE
256else
257 OPT_DEFS += -DCORTEX_USE_FPU=FALSE
258endif
259
260DEBUG = gdb 256DEBUG = gdb
261 257
262DFU_ARGS ?= 258DFU_ARGS ?=