mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
add CFLAGS_SKIP to improve sam compile time
This commit is contained in:
parent
ab0da3c30b
commit
322f58ea85
5
.github/workflows/build_arm.yml
vendored
5
.github/workflows/build_arm.yml
vendored
@ -48,9 +48,8 @@ jobs:
|
|||||||
- 'stm32f0 stm32f1'
|
- 'stm32f0 stm32f1'
|
||||||
- 'stm32f4'
|
- 'stm32f4'
|
||||||
- 'stm32f7'
|
- 'stm32f7'
|
||||||
- 'stm32g4 stm32wb'
|
- 'stm32g4 stm32h7'
|
||||||
- 'stm32h7'
|
- 'stm32l0 stm32l4 stm32u5 stm32wb'
|
||||||
- 'stm32l0 stm32l4'
|
|
||||||
- 'tm4c123 xmc4000'
|
- 'tm4c123 xmc4000'
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
|
@ -66,6 +66,10 @@ ifeq ($(NO_LTO),1)
|
|||||||
CFLAGS := $(filter-out -flto,$(CFLAGS))
|
CFLAGS := $(filter-out -flto,$(CFLAGS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CFLAGS_SKIP),)
|
||||||
|
CFLAGS := $(filter-out $(CFLAGS_SKIP),$(CFLAGS))
|
||||||
|
endif
|
||||||
|
|
||||||
LDFLAGS += $(CFLAGS) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
|
LDFLAGS += $(CFLAGS) -Wl,-Map=$@.map -Wl,-cref -Wl,-gc-sections
|
||||||
|
|
||||||
ifdef LD_FILE
|
ifdef LD_FILE
|
||||||
|
@ -9,10 +9,15 @@ CFLAGS += \
|
|||||||
-nostdlib -nostartfiles \
|
-nostdlib -nostartfiles \
|
||||||
-DCONF_DFLL_OVERWRITE_CALIBRATION=0 \
|
-DCONF_DFLL_OVERWRITE_CALIBRATION=0 \
|
||||||
-DOSC32K_OVERWRITE_CALIBRATION=0 \
|
-DOSC32K_OVERWRITE_CALIBRATION=0 \
|
||||||
|
-DCFG_EXAMPLE_MSC_READONLY \
|
||||||
|
-DCFG_EXAMPLE_VIDEO_READONLY \
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMD11
|
-DCFG_TUSB_MCU=OPT_MCU_SAMD11
|
||||||
|
|
||||||
# suppress warning caused by vendor mcu driver
|
# 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_C += \
|
||||||
src/portable/microchip/samd/dcd_samd.c \
|
src/portable/microchip/samd/dcd_samd.c \
|
||||||
|
@ -13,7 +13,10 @@ CFLAGS += \
|
|||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMD21
|
-DCFG_TUSB_MCU=OPT_MCU_SAMD21
|
||||||
|
|
||||||
# suppress warning caused by vendor mcu driver
|
# 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_C += \
|
||||||
src/portable/microchip/samd/dcd_samd.c \
|
src/portable/microchip/samd/dcd_samd.c \
|
||||||
|
@ -13,8 +13,8 @@ CFLAGS += \
|
|||||||
-nostdlib -nostartfiles \
|
-nostdlib -nostartfiles \
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMD51
|
-DCFG_TUSB_MCU=OPT_MCU_SAMD51
|
||||||
|
|
||||||
# suppress warning caused by vendor mcu driver
|
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
|
||||||
CFLAGS += -Wno-error=cast-qual
|
CFLAGS_SKIP += -Wcast-qual
|
||||||
|
|
||||||
SRC_C += \
|
SRC_C += \
|
||||||
src/portable/microchip/samd/dcd_samd.c \
|
src/portable/microchip/samd/dcd_samd.c \
|
||||||
|
@ -13,8 +13,8 @@ CFLAGS += \
|
|||||||
-nostdlib -nostartfiles \
|
-nostdlib -nostartfiles \
|
||||||
-DCFG_TUSB_MCU=OPT_MCU_SAME5X
|
-DCFG_TUSB_MCU=OPT_MCU_SAME5X
|
||||||
|
|
||||||
# suppress warning caused by vendor mcu driver
|
# SAM driver is flooded with -Wcast-qual which slow down complication significantly
|
||||||
#CFLAGS += -Wno-error=cast-qual
|
CFLAGS_SKIP += -Wcast-qual
|
||||||
|
|
||||||
SRC_C += \
|
SRC_C += \
|
||||||
src/portable/microchip/samd/dcd_samd.c \
|
src/portable/microchip/samd/dcd_samd.c \
|
||||||
|
@ -11,7 +11,10 @@ CFLAGS += \
|
|||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
|
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
|
||||||
|
|
||||||
# suppress following warnings from mcu driver
|
# 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
|
ASF_DIR = hw/mcu/microchip/same70
|
||||||
|
|
||||||
|
@ -11,7 +11,10 @@ CFLAGS += \
|
|||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
|
-DCFG_TUSB_MCU=OPT_MCU_SAMX7X
|
||||||
|
|
||||||
# suppress following warnings from mcu driver
|
# 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
|
ASF_DIR = hw/mcu/microchip/same70
|
||||||
|
|
||||||
|
@ -12,7 +12,10 @@ CFLAGS += \
|
|||||||
-DCFG_TUSB_MCU=OPT_MCU_SAMG
|
-DCFG_TUSB_MCU=OPT_MCU_SAMG
|
||||||
|
|
||||||
# suppress following warnings from mcu driver
|
# 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
|
ASF_DIR = hw/mcu/microchip/samg55
|
||||||
|
|
||||||
|
@ -14,7 +14,10 @@ CFLAGS += \
|
|||||||
-DCFG_TUSB_MCU=OPT_MCU_SAML22
|
-DCFG_TUSB_MCU=OPT_MCU_SAML22
|
||||||
|
|
||||||
# suppress warning caused by vendor mcu driver
|
# 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_C += \
|
||||||
src/portable/microchip/samd/dcd_samd.c \
|
src/portable/microchip/samd/dcd_samd.c \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user