diff --git a/Firmware/Makefile b/Firmware/Makefile index b5e4fb33c..5f26e09fd 100644 --- a/Firmware/Makefile +++ b/Firmware/Makefile @@ -11,7 +11,7 @@ # debug build? DEBUG = 0 # optimization -OPT = -O2 # -mno-unaligned-access +OPT = -O2 OPTCPP = -Os @@ -161,7 +161,7 @@ endif # compile gcc flags ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections -CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections -std=gnu11 +CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections -std=gnu11 -mno-unaligned-access ifeq ($(DEBUG), 1) CFLAGS += -g -gdwarf-2 @@ -171,7 +171,7 @@ endif # Generate dependency information CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" -CXXFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPTCPP) -Wall -fdata-sections -ffunction-sections -fno-exceptions -fno-use-cxa-atexit -std=gnu++20 -fstack-usage -Wno-volatile +CXXFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPTCPP) -Wall -fdata-sections -ffunction-sections -fno-exceptions -fno-use-cxa-atexit -std=gnu++20 -fstack-usage -Wno-volatile -mno-unaligned-access ####################################### # LDFLAGS