summaryrefslogtreecommitdiff
path: root/ports/stm
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-12-15 12:23:56 -0500
committerDan Halbert <halbert@halwitz.org>2020-12-15 12:23:56 -0500
commitfb33c4e1c0f83bce8f8cc1e8cae83695aeb2471d (patch)
tree5873d051adb7a74e11b6a15c6f4e20c39a1deeb1 /ports/stm
parentbbbd621b184ee13740c0c8e4c94e7aed0db4f070 (diff)
-ftree-vrp better diagnostics on -Os builds; -fno-inline-functions for -O2; fix struct init in HCI bleio
Diffstat (limited to 'ports/stm')
-rwxr-xr-xports/stm/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/ports/stm/Makefile b/ports/stm/Makefile
index b9426e07e..e09fe736c 100755
--- a/ports/stm/Makefile
+++ b/ports/stm/Makefile
@@ -86,7 +86,7 @@ ifeq ($(DEBUG), 1)
CFLAGS += -fno-inline -fno-ipa-sra
else
CFLAGS += -DNDEBUG
- OPTIMIZATION_FLAGS ?= -O2
+ OPTIMIZATION_FLAGS ?= -O2 -fno-inline-functions
CFLAGS += -ggdb3
# TODO: Test with -flto
# CFLAGS += -flto
@@ -95,6 +95,9 @@ endif
# to override compiler optimization level, set in boards/$(BOARD)/mpconfigboard.mk
CFLAGS += $(OPTIMIZATION_FLAGS)
+# Add -ftree-vrp optimization and checking to all builds. It's not enabled for -Os by default.
+CFLAGS += -ftree-vrp
+
# MCU Series is defined by the HAL package and doesn't need to be specified here
C_DEFS = -D$(MCU_PACKAGE) -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -D$(MCU_VARIANT)