From b63cc1e9efb3618141b8f2cdd19ffd6823b73bb7 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 26 Mar 2018 00:00:47 +1100 Subject: [PATCH] stm32/Makefile: Re-enable strict aliasing optimisation for ST HAL files. The HAL requires strict aliasing optimisation to be turned on to function correctly (at least for the SD card driver on F4 MCUs). This optimisation was recently disabled with the addition of H7 support due to the H7 HAL having errors with the strict aliasing optimisation enabled. But this is now fixed in the latest stm32lib and so the optimisation can now be re-enabled. Thanks to @chuckbook for finding that there was a problem with the SD card on F4 MCUs with the strict aliasing optimisation disabled. --- ports/stm32/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile index ba4c90dabe..3f381bde0f 100644 --- a/ports/stm32/Makefile +++ b/ports/stm32/Makefile @@ -253,7 +253,6 @@ SRC_O = \ $(STARTUP_FILE) \ gchelper.o \ -$(BUILD)/$(HAL_DIR)/Src/%.o: CFLAGS += -fno-strict-aliasing SRC_HAL = $(addprefix $(HAL_DIR)/Src/stm32$(MCU_SERIES)xx_,\ hal.c \ hal_adc.c \