From a5cde14428f4993ad5556456fc5780af2530273c Mon Sep 17 00:00:00 2001 From: inmarket Date: Fri, 27 Nov 2015 10:28:41 +1000 Subject: [PATCH] ChibiOS does not work reliably with GCC -O0 with recent compilers. Change to -O1 --- .../base/Mikromedia-Plus-STM32-M4/example_chibios_2.x/Makefile | 2 +- .../base/Mikromedia-Plus-STM32-M4/example_chibios_3.x/Makefile | 2 +- .../Mikromedia-STM32-M4-ILI9341/example_chibios_2.x/Makefile | 2 +- .../Mikromedia-STM32-M4-ILI9341/example_chibios_3.x/Makefile | 2 +- boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile | 2 +- boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_2.x/Makefile b/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_2.x/Makefile index 4d6cf31a..344e3bf4 100644 --- a/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_2.x/Makefile +++ b/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_2.x/Makefile @@ -36,7 +36,7 @@ endif # ARCH = arm-none-eabi- -SRCFLAGS = -ggdb -O0 +SRCFLAGS = -ggdb -O1 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS = diff --git a/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_3.x/Makefile b/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_3.x/Makefile index 7f274b95..03ed9e2b 100644 --- a/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_3.x/Makefile +++ b/boards/base/Mikromedia-Plus-STM32-M4/example_chibios_3.x/Makefile @@ -6,7 +6,7 @@ # Compiler options here. ifeq ($(USE_OPT),) # Replace -O0 with -O2 for a production build. -O2 just messes with the debugger. - USE_OPT = -O0 -g -fomit-frame-pointer -falign-functions=16 + USE_OPT = -O1 -g -fomit-frame-pointer -falign-functions=16 endif # C specific options here (added to USE_OPT). diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_2.x/Makefile b/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_2.x/Makefile index 69eb7d59..387656f6 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_2.x/Makefile +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_2.x/Makefile @@ -35,7 +35,7 @@ endif # ARCH = arm-none-eabi- -SRCFLAGS = -ggdb -O0 +SRCFLAGS = -ggdb -O1 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS = diff --git a/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_3.x/Makefile b/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_3.x/Makefile index a68e06e4..da6e199e 100644 --- a/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_3.x/Makefile +++ b/boards/base/Mikromedia-STM32-M4-ILI9341/example_chibios_3.x/Makefile @@ -36,7 +36,7 @@ endif # ARCH = arm-none-eabi- -SRCFLAGS = -ggdb -O0 +SRCFLAGS = -ggdb -O1 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS = diff --git a/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile b/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile index 37dd4b5e..f5a1b2c2 100644 --- a/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile +++ b/boards/base/STM32F429i-Discovery/example_chibios_2.x/Makefile @@ -34,7 +34,7 @@ endif # ARCH = arm-none-eabi- -SRCFLAGS = -ggdb -O0 +SRCFLAGS = -ggdb -O1 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS = diff --git a/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile b/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile index 4a1d6a94..87eb6e61 100644 --- a/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile +++ b/boards/base/STM32F429i-Discovery/example_chibios_3.x/Makefile @@ -37,7 +37,7 @@ endif # ARCH = arm-none-eabi- -SRCFLAGS = -ggdb -O0 +SRCFLAGS = -ggdb -O1 CFLAGS = CXXFLAGS = -fno-rtti ASFLAGS =