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,13 +1,10 @@
MCU_VARIANT = stm32g474xx
CFLAGS += \
-DSTM32G474xx \
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32g474xx.s
GCC_LD_FILE = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32g474xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32g474xx_flash.icf
# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32g474re

View File

@@ -1,14 +1,11 @@
MCU_VARIANT = stm32g474xx
CFLAGS += \
-DSTM32G474xx \
-DHSE_VALUE=24000000
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32g474xx.s
GCC_LD_FILE = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32g474xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32g474xx_flash.icf
# Linker
LD_FILE_GCC = $(BOARD_PATH)/STM32G474RETx_FLASH.ld
# For flash-jlink target
JLINK_DEVICE = stm32g474re

View File

@@ -15,12 +15,12 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_STM32G4
# GCC Flags
GCC_CFLAGS += \
CFLAGS_GCC += \
-flto \
-nostdlib -nostartfiles \
# suppress warning caused by vendor mcu driver
GCC_CFLAGS += -Wno-error=cast-align
CFLAGS_GCC += -Wno-error=cast-align
# -----------------
# Sources & Include
@@ -45,5 +45,12 @@ INC += \
$(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
# flash target using on-board stlink
flash: flash-stlink