[platform][stm32f4xx] append the necessary #define to GLOBAL_COMPILEFLAGS
GLOBAL_CFLAGS will only work for .c files, which breaks on the first
inclusion of the headers by a .cpp file. *_COMPILEFLAGS is for all
language types (C, asm, C++)
@@ -14,16 +14,16 @@ ARM_CPU := cortex-m4
# TODO: integrate better with platform/stm32f4xx/CMSIS/stm32f4xx.h
ifeq ($(STM32_CHIP),stm32f407)
-GLOBAL_CFLAGS=-DSTM32F40_41xxx=1
+GLOBAL_COMPILEFLAGS += -DSTM32F40_41xxx=1
FOUND_CHIP := true
endif
ifeq ($(STM32_CHIP),stm32f417)
FOUND_CHIP := true
-GLOBAL_CFLAGS=-DSTM32F40_41xxx=1
+GLOBAL_COMPILEFLAGS += -DSTM32F40_41xxx=1
endif
ifeq ($(STM32_CHIP),stm32f429)
FOUND_CHIP := true
-GLOBAL_CFLAGS=-DSTM32F429_439xx=1
+GLOBAL_COMPILEFLAGS += -DSTM32F429_439xx=1
endif
ifeq ($(FOUND_CHIP),)
