summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-03-19 12:47:05 +0700
committerhathach <[email protected]>2023-03-19 12:47:05 +0700
commit322f58ea8530e2b43d00a087b6d501776be25a00 (patch)
tree1a136349f8cc2da319f404c7b3149bc5ee80ff66 /hw
parentab0da3c30baab6eb63e55217f2b4d5a719fb86e4 (diff)
add CFLAGS_SKIP to improve sam compile time
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/samd11/family.mk7
-rw-r--r--hw/bsp/samd21/family.mk5
-rw-r--r--hw/bsp/samd51/family.mk4
-rw-r--r--hw/bsp/same5x/family.mk4
-rw-r--r--hw/bsp/same70_qmtech/board.mk5
-rw-r--r--hw/bsp/same70_xplained/board.mk5
-rw-r--r--hw/bsp/samg55xplained/board.mk5
-rw-r--r--hw/bsp/saml2x/family.mk5
8 files changed, 30 insertions, 10 deletions
diff --git a/hw/bsp/samd11/family.mk b/hw/bsp/samd11/family.mk
index dc6678b30..a2a5268aa 100644
--- a/hw/bsp/samd11/family.mk
+++ b/hw/bsp/samd11/family.mk
@@ -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 \
diff --git a/hw/bsp/samd21/family.mk b/hw/bsp/samd21/family.mk
index 6d02d7fa6..30eccacb2 100644
--- a/hw/bsp/samd21/family.mk
+++ b/hw/bsp/samd21/family.mk
@@ -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 \
diff --git a/hw/bsp/samd51/family.mk b/hw/bsp/samd51/family.mk
index 3ecc5aa66..657e33438 100644
--- a/hw/bsp/samd51/family.mk
+++ b/hw/bsp/samd51/family.mk
@@ -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 \
diff --git a/hw/bsp/same5x/family.mk b/hw/bsp/same5x/family.mk
index 7f8692c97..df1af4a9d 100644
--- a/hw/bsp/same5x/family.mk
+++ b/hw/bsp/same5x/family.mk
@@ -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 \
diff --git a/hw/bsp/same70_qmtech/board.mk b/hw/bsp/same70_qmtech/board.mk
index 1dcb8bfcd..ad5af2020 100644
--- a/hw/bsp/same70_qmtech/board.mk
+++ b/hw/bsp/same70_qmtech/board.mk
@@ -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
diff --git a/hw/bsp/same70_xplained/board.mk b/hw/bsp/same70_xplained/board.mk
index 95c4aaaa2..769d03e21 100644
--- a/hw/bsp/same70_xplained/board.mk
+++ b/hw/bsp/same70_xplained/board.mk
@@ -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
diff --git a/hw/bsp/samg55xplained/board.mk b/hw/bsp/samg55xplained/board.mk
index 7cc9487fd..ed0d59772 100644
--- a/hw/bsp/samg55xplained/board.mk
+++ b/hw/bsp/samg55xplained/board.mk
@@ -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
diff --git a/hw/bsp/saml2x/family.mk b/hw/bsp/saml2x/family.mk
index 6022158de..91c2cfa61 100644
--- a/hw/bsp/saml2x/family.mk
+++ b/hw/bsp/saml2x/family.mk
@@ -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 \