rename GCC_CFLAGS to CFLAGS_GCC, GCC_SRC_S to SRC_S_GCC etc ..

This commit is contained in:
hathach
2023-06-24 19:31:33 +07:00
parent 7d0ce5605a
commit 2216704db8
45 changed files with 173 additions and 174 deletions

View File

@@ -1,12 +1,7 @@
CFLAGS += -DSTM32F070xB -DCFG_EXAMPLE_VIDEO_READONLY
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f070xb.s
GCC_LD_FILE = $(BOARD_PATH)/stm32F070rbtx_flash.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f070xb.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f070xb_flash.icf
# Linker
LD_FILE_GCC = $(BOARD_PATH)/stm32F070rbtx_flash.ld
# For flash-jlink target
JLINK_DEVICE = stm32f070rb

View File

@@ -1,10 +1,9 @@
MCU_VARIANT = stm32f072xb
CFLAGS += -DSTM32F072xB -DCFG_EXAMPLE_VIDEO_READONLY
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
GCC_LD_FILE = $(BOARD_PATH)/STM32F072RBTx_FLASH.ld
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f072xb.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f072xb_flash.icf
# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32F072RBTx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32f072rb

View File

@@ -1,10 +1,10 @@
CFLAGS += -DSTM32F072xB -DLSI_VALUE=40000 -DCFG_EXAMPLE_VIDEO_READONLY
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
GCC_LD_FILE = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32f072xb.s
LD_FILE_GCC = $(BOARD_PATH)/STM32F072VBTx_FLASH.ld
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f072xb.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f072xb_flash.icf
SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_stm32f072xb.s
LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/stm32f072xb_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32f072vb

View File

@@ -16,12 +16,12 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32F0
# GCC Flags
GCC_CFLAGS += \
CFLAGS_GCC += \
-flto \
-nostdlib -nostartfiles \
# suppress warning caused by vendor mcu driver
GCC_CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align
CFLAGS_GCC += -Wno-error=unused-parameter -Wno-error=cast-align
# ------------------------
# All source paths should be relative to the top level.
@@ -44,3 +44,10 @@ INC += \
$(TOP)/lib/CMSIS_5/CMSIS/Core/Include \
$(TOP)/$(ST_CMSIS)/Include \
$(TOP)/$(ST_HAL_DRIVER)/Inc
# Startup
SRC_S_GCC += $(ST_CMSIS)/Source/Templates/gcc/startup_$(MCU_VARIANT).s
SRC_S_IAR += $(ST_CMSIS)/Source/Templates/iar/startup_$(MCU_VARIANT).s
# Linker
LD_FILE_IAR = $(ST_CMSIS)/Source/Templates/iar/linker/$(MCU_VARIANT)_flash.icf