[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++)
This commit is contained in:
Travis Geiselbrecht
2022-08-14 19:05:20 -07:00
parent 2985728864
commit f2cf99bf73

View File

@@ -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),)