summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-07-16 14:47:32 +1000
committerDamien George <damien.p.george@gmail.com>2019-07-16 14:47:32 +1000
commit64aebca1553bea62b4266c0194838a5a7df0e91f (patch)
tree477c4c396a81e478ee95cc2cfa544c7e05328ba5
parent102d9911e988959a7ef0e5f8123c41b4aca5c144 (diff)
stm32/Makefile: Allow a board to disable float support.
By using "MICROPY_FLOAT_IMPL = none" in its mpconfigboard.mk file.
-rw-r--r--ports/stm32/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index d2ca4122a..f74180d39 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -91,9 +91,13 @@ CFLAGS += -DMICROPY_HW_VTOR=$(TEXT0_ADDR)
ifeq ($(MICROPY_FLOAT_IMPL),double)
CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_DOUBLE
else
+ifeq ($(MICROPY_FLOAT_IMPL),none)
+CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_NONE
+else
CFLAGS += -DMICROPY_FLOAT_IMPL=MICROPY_FLOAT_IMPL_FLOAT
CFLAGS += -fsingle-precision-constant -Wdouble-promotion
endif
+endif
LDFLAGS = -nostdlib -L $(LD_DIR) $(addprefix -T,$(LD_FILES)) -Map=$(@:.elf=.map) --cref
LDFLAGS += --defsym=_estack_reserve=8