add CFLAGS_SKIP to improve sam compile time

This commit is contained in:
hathach 2023-03-19 12:47:05 +07:00
parent ab0da3c30b
commit 322f58ea85
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
10 changed files with 36 additions and 13 deletions

View File

@ -48,9 +48,8 @@ jobs:
- 'stm32f0 stm32f1'
- 'stm32f4'
- 'stm32f7'
- 'stm32g4 stm32wb'
- 'stm32h7'
- 'stm32l0 stm32l4'
- 'stm32g4 stm32h7'
- 'stm32l0 stm32l4 stm32u5 stm32wb'
- 'tm4c123 xmc4000'
steps:
- name: Setup Python

View File

@ -66,6 +66,10 @@ ifeq ($(NO_LTO),1)
CFLAGS := $(filter-out -flto,$(CFLAGS))
endif
ifneq ($(CFLAGS_SKIP),)
CFLAGS := $(filter-out $(CFLAGS_SKIP),$(CFLAGS))
endif
LDFLAGS += $(CFLAGS) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
ifdef LD_FILE

View File

@ -9,10 +9,15 @@ CFLAGS += \
-nostdlib -nostartfiles \
-DCONF_DFLL_OVERWRITE_CALIBRATION=0 \
-DOSC32K_OVERWRITE_CALIBRATION=0 \
-DCFG_EXAMPLE_MSC_READONLY \
-DCFG_EXAMPLE_VIDEO_READONLY \
-DCFG_TUSB_MCU=OPT_MCU_SAMD11
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
CFLAGS += -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \

View File

@ -13,7 +13,10 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMD21
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
CFLAGS += -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \

View File

@ -13,8 +13,8 @@ CFLAGS += \
-nostdlib -nostartfiles \
-DCFG_TUSB_MCU=OPT_MCU_SAMD51
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \

View File

@ -13,8 +13,8 @@ CFLAGS += \
-nostdlib -nostartfiles \
-DCFG_TUSB_MCU=OPT_MCU_SAME5X
# suppress warning caused by vendor mcu driver
#CFLAGS += -Wno-error=cast-qual
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \

View File

@ -11,7 +11,10 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
# suppress following warnings from mcu driver
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual -Wno-error=redundant-decls
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
ASF_DIR = hw/mcu/microchip/same70

View File

@ -11,7 +11,10 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
# suppress following warnings from mcu driver
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=cast-qual -Wno-error=redundant-decls
CFLAGS += -Wno-error=unused-parameter -Wno-error=cast-align -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
ASF_DIR = hw/mcu/microchip/same70

View File

@ -12,7 +12,10 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAMG
# suppress following warnings from mcu driver
CFLAGS += -Wno-error=undef -Wno-error=cast-qual -Wno-error=null-dereference -Wno-error=redundant-decls
CFLAGS += -Wno-error=undef -Wno-error=null-dereference -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
ASF_DIR = hw/mcu/microchip/samg55

View File

@ -14,7 +14,10 @@ CFLAGS += \
-DCFG_TUSB_MCU=OPT_MCU_SAML22
# suppress warning caused by vendor mcu driver
CFLAGS += -Wno-error=cast-qual -Wno-error=redundant-decls
CFLAGS += -Wno-error=redundant-decls
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
CFLAGS_SKIP += -Wcast-qual
SRC_C += \
src/portable/microchip/samd/dcd_samd.c \