summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <[email protected]>2022-01-05 15:44:23 -0800
committerScott Shawcroft <[email protected]>2022-01-05 15:44:23 -0800
commit7b27b8f498a185d8a7c1bea5dac8f43e7030ebd7 (patch)
tree520d7b75abe6f1b679d3ef5e42b1ce26747955fa
parent4fe0a30ec7bf254c839a76da9be3a2968d1690db (diff)
Unify skip and only logic for build scripts
And switch to a single file that can include mcu, family or board.
-rw-r--r--.gitignore2
-rw-r--r--examples/device/audio_4_channel_mic/.skip.MCU_SAMD110
-rw-r--r--examples/device/audio_4_channel_mic/.skip.MCU_SAME5X0
-rw-r--r--examples/device/audio_4_channel_mic/.skip.MCU_SAMG0
-rw-r--r--examples/device/audio_4_channel_mic/skip.txt3
-rw-r--r--examples/device/audio_test/.skip.MCU_SAMD110
-rw-r--r--examples/device/audio_test/.skip.MCU_SAME5X0
-rw-r--r--examples/device/audio_test/.skip.MCU_SAMG0
-rw-r--r--examples/device/audio_test/skip.txt3
-rw-r--r--examples/device/cdc_msc/.skip.MCU_SAMD110
-rw-r--r--examples/device/cdc_msc/skip.txt1
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_BCM27110
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_BCM28350
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_BCM28370
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_CXD560
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_GD32VF1030
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX0
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx0
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_RP20400
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_SAMD110
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_SAMX7X0
-rw-r--r--examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI0
-rw-r--r--examples/device/cdc_msc_freertos/skip.txt10
-rw-r--r--examples/device/dfu/.skip.MCU_TM4C1234
-rw-r--r--examples/device/dfu/skip.txt1
-rw-r--r--examples/device/dynamic_configuration/.skip.MCU_SAMD110
-rw-r--r--examples/device/dynamic_configuration/skip.txt1
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_BCM27110
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_BCM28350
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_BCM28370
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_CXD560
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_GD32VF1030
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx0
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_RP20400
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_SAMD110
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_SAMX7X0
-rw-r--r--examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI0
-rw-r--r--examples/device/hid_composite_freertos/skip.txt9
-rw-r--r--examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX0
-rw-r--r--examples/device/msc_dual_lun/.skip.MCU_SAMD110
-rw-r--r--examples/device/msc_dual_lun/skip.txt2
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_BCM27111
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_BCM28351
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_BCM28371
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX0
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_LPC13XX0
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX0
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx1
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_NUC1210
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_SAMD110
-rw-r--r--examples/device/net_lwip_webserver/.skip.MCU_STM32L00
-rw-r--r--examples/device/net_lwip_webserver/skip.txt10
-rw-r--r--examples/device/uac2_headset/.skip.MCU_LPC11UXX0
-rw-r--r--examples/device/uac2_headset/.skip.MCU_LPC13XX0
-rw-r--r--examples/device/uac2_headset/.skip.MCU_NUC1210
-rw-r--r--examples/device/uac2_headset/.skip.MCU_SAMD110
-rw-r--r--examples/device/uac2_headset/.skip.MCU_SAME5X0
-rw-r--r--examples/device/uac2_headset/.skip.MCU_SAMG0
-rw-r--r--examples/device/uac2_headset/skip.txt6
-rw-r--r--examples/device/video_capture/.skip.MCU_MSP430x5xx1
-rw-r--r--examples/device/video_capture/.skip.MCU_SAMD110
-rw-r--r--examples/device/video_capture/skip.txt2
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_LPC175X_6X0
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_LPC177X_8X0
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_LPC18XX0
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_LPC40XX0
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_LPC43XX0
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_MIMXRT10XX0
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_MSP432E40
-rw-r--r--examples/host/cdc_msc_hid/.only.MCU_RP20400
-rw-r--r--examples/host/cdc_msc_hid/only.txt8
-rw-r--r--examples/host/hid_controller/.only.MCU_LPC175X_6X0
-rw-r--r--examples/host/hid_controller/.only.MCU_LPC177X_8X0
-rw-r--r--examples/host/hid_controller/.only.MCU_LPC18XX0
-rw-r--r--examples/host/hid_controller/.only.MCU_LPC40XX0
-rw-r--r--examples/host/hid_controller/.only.MCU_LPC43XX0
-rw-r--r--examples/host/hid_controller/.only.MCU_MIMXRT10XX0
-rw-r--r--examples/host/hid_controller/.only.MCU_MSP432E40
-rw-r--r--examples/host/hid_controller/.only.MCU_RP20400
-rw-r--r--examples/host/hid_controller/only.txt8
-rw-r--r--hw/bsp/samd21/boards/curiosity_nano/.skip.device.net_lwip_webserver0
-rw-r--r--tools/build_board.py31
-rw-r--r--tools/build_esp32sx.py7
-rw-r--r--tools/build_family.py44
-rw-r--r--tools/build_utils.py61
85 files changed, 136 insertions, 82 deletions
diff --git a/.gitignore b/.gitignore
index f7adff4c9..87a5faa80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,5 @@ cov-int
# cppcheck build directories
*-build-dir
/_bin/
+__pycache__
+
diff --git a/examples/device/audio_4_channel_mic/.skip.MCU_SAMD11 b/examples/device/audio_4_channel_mic/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/audio_4_channel_mic/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/audio_4_channel_mic/.skip.MCU_SAME5X b/examples/device/audio_4_channel_mic/.skip.MCU_SAME5X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/audio_4_channel_mic/.skip.MCU_SAME5X
+++ /dev/null
diff --git a/examples/device/audio_4_channel_mic/.skip.MCU_SAMG b/examples/device/audio_4_channel_mic/.skip.MCU_SAMG
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/audio_4_channel_mic/.skip.MCU_SAMG
+++ /dev/null
diff --git a/examples/device/audio_4_channel_mic/skip.txt b/examples/device/audio_4_channel_mic/skip.txt
new file mode 100644
index 000000000..ae9b57f1f
--- /dev/null
+++ b/examples/device/audio_4_channel_mic/skip.txt
@@ -0,0 +1,3 @@
+mcu:SAMD11
+mcu:SAME5X
+mcu:SAMG \ No newline at end of file
diff --git a/examples/device/audio_test/.skip.MCU_SAMD11 b/examples/device/audio_test/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/audio_test/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/audio_test/.skip.MCU_SAME5X b/examples/device/audio_test/.skip.MCU_SAME5X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/audio_test/.skip.MCU_SAME5X
+++ /dev/null
diff --git a/examples/device/audio_test/.skip.MCU_SAMG b/examples/device/audio_test/.skip.MCU_SAMG
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/audio_test/.skip.MCU_SAMG
+++ /dev/null
diff --git a/examples/device/audio_test/skip.txt b/examples/device/audio_test/skip.txt
new file mode 100644
index 000000000..ae9b57f1f
--- /dev/null
+++ b/examples/device/audio_test/skip.txt
@@ -0,0 +1,3 @@
+mcu:SAMD11
+mcu:SAME5X
+mcu:SAMG \ No newline at end of file
diff --git a/examples/device/cdc_msc/.skip.MCU_SAMD11 b/examples/device/cdc_msc/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/cdc_msc/skip.txt b/examples/device/cdc_msc/skip.txt
new file mode 100644
index 000000000..d844feae8
--- /dev/null
+++ b/examples/device/cdc_msc/skip.txt
@@ -0,0 +1 @@
+mcu:SAMD11 \ No newline at end of file
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_BCM2711 b/examples/device/cdc_msc_freertos/.skip.MCU_BCM2711
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_BCM2711
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_BCM2835 b/examples/device/cdc_msc_freertos/.skip.MCU_BCM2835
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_BCM2835
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_BCM2837 b/examples/device/cdc_msc_freertos/.skip.MCU_BCM2837
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_BCM2837
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_CXD56 b/examples/device/cdc_msc_freertos/.skip.MCU_CXD56
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_CXD56
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_GD32VF103 b/examples/device/cdc_msc_freertos/.skip.MCU_GD32VF103
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_GD32VF103
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX b/examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_MKL25ZXX
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx b/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_MSP430x5xx
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_RP2040 b/examples/device/cdc_msc_freertos/.skip.MCU_RP2040
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_RP2040
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11 b/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_SAMX7X b/examples/device/cdc_msc_freertos/.skip.MCU_SAMX7X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_SAMX7X
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI b/examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/cdc_msc_freertos/.skip.MCU_VALENTYUSB_EPTRI
+++ /dev/null
diff --git a/examples/device/cdc_msc_freertos/skip.txt b/examples/device/cdc_msc_freertos/skip.txt
new file mode 100644
index 000000000..7137b78af
--- /dev/null
+++ b/examples/device/cdc_msc_freertos/skip.txt
@@ -0,0 +1,10 @@
+mcu:CXD56
+mcu:MSP430x5xx
+mcu:SAMD11
+mcu:VALENTYUSB_EPTRI
+mcu:MKL25ZXX
+mcu:RP2040
+mcu:SAMX7X
+mcu:GD32VF103
+family:broadcom_64bit
+family:broadcom_32bit \ No newline at end of file
diff --git a/examples/device/dfu/.skip.MCU_TM4C123 b/examples/device/dfu/.skip.MCU_TM4C123
deleted file mode 100644
index 6260e6e25..000000000
--- a/examples/device/dfu/.skip.MCU_TM4C123
+++ /dev/null
@@ -1,4 +0,0 @@
-LINK _build/ek-tm4c123gxl/dfu.elf
-/home/runner/cache/toolchain/xpack-arm-none-eabi-gcc-10.2.1-1.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: section .ARM.exidx.text._close LMA [0000000000002980,0000000000002987] overlaps section .data LMA [0000000000002980,0000000000002a03]
-collect2: error: ld returned 1 exit status
-make: *** [../../rules.mk:94: _build/ek-tm4c123gxl/dfu.elf] Error 1 \ No newline at end of file
diff --git a/examples/device/dfu/skip.txt b/examples/device/dfu/skip.txt
new file mode 100644
index 000000000..2c9d94902
--- /dev/null
+++ b/examples/device/dfu/skip.txt
@@ -0,0 +1 @@
+mcu:TM4C123 \ No newline at end of file
diff --git a/examples/device/dynamic_configuration/.skip.MCU_SAMD11 b/examples/device/dynamic_configuration/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/dynamic_configuration/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/dynamic_configuration/skip.txt b/examples/device/dynamic_configuration/skip.txt
new file mode 100644
index 000000000..d844feae8
--- /dev/null
+++ b/examples/device/dynamic_configuration/skip.txt
@@ -0,0 +1 @@
+mcu:SAMD11 \ No newline at end of file
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_BCM2711 b/examples/device/hid_composite_freertos/.skip.MCU_BCM2711
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_BCM2711
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_BCM2835 b/examples/device/hid_composite_freertos/.skip.MCU_BCM2835
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_BCM2835
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_BCM2837 b/examples/device/hid_composite_freertos/.skip.MCU_BCM2837
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_BCM2837
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_CXD56 b/examples/device/hid_composite_freertos/.skip.MCU_CXD56
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_CXD56
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_GD32VF103 b/examples/device/hid_composite_freertos/.skip.MCU_GD32VF103
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_GD32VF103
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx b/examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_MSP430x5xx
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_RP2040 b/examples/device/hid_composite_freertos/.skip.MCU_RP2040
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_RP2040
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_SAMD11 b/examples/device/hid_composite_freertos/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_SAMX7X b/examples/device/hid_composite_freertos/.skip.MCU_SAMX7X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_SAMX7X
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI b/examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/hid_composite_freertos/.skip.MCU_VALENTYUSB_EPTRI
+++ /dev/null
diff --git a/examples/device/hid_composite_freertos/skip.txt b/examples/device/hid_composite_freertos/skip.txt
new file mode 100644
index 000000000..e64187fd4
--- /dev/null
+++ b/examples/device/hid_composite_freertos/skip.txt
@@ -0,0 +1,9 @@
+mcu:CXD56
+mcu:MSP430x5xx
+mcu:SAMD11
+mcu:VALENTYUSB_EPTRI
+mcu:RP2040
+mcu:SAMX7X
+mcu:GD32VF103
+family:broadcom_64bit
+family:broadcom_32bit \ No newline at end of file
diff --git a/examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX b/examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/msc_dual_lun/.skip.MCU_MKL25ZXX
+++ /dev/null
diff --git a/examples/device/msc_dual_lun/.skip.MCU_SAMD11 b/examples/device/msc_dual_lun/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/msc_dual_lun/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/msc_dual_lun/skip.txt b/examples/device/msc_dual_lun/skip.txt
new file mode 100644
index 000000000..3549c702a
--- /dev/null
+++ b/examples/device/msc_dual_lun/skip.txt
@@ -0,0 +1,2 @@
+mcu:SAMD11
+mcu:MKL25ZXX \ No newline at end of file
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_BCM2711 b/examples/device/net_lwip_webserver/.skip.MCU_BCM2711
deleted file mode 100644
index bdc68f5db..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_BCM2711
+++ /dev/null
@@ -1 +0,0 @@
-tinyusb/lib/lwip/src/include/lwip/arch.h:202:13: error: conflicting types for 'ssize_t' \ No newline at end of file
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_BCM2835 b/examples/device/net_lwip_webserver/.skip.MCU_BCM2835
deleted file mode 100644
index bdc68f5db..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_BCM2835
+++ /dev/null
@@ -1 +0,0 @@
-tinyusb/lib/lwip/src/include/lwip/arch.h:202:13: error: conflicting types for 'ssize_t' \ No newline at end of file
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_BCM2837 b/examples/device/net_lwip_webserver/.skip.MCU_BCM2837
deleted file mode 100644
index bdc68f5db..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_BCM2837
+++ /dev/null
@@ -1 +0,0 @@
-tinyusb/lib/lwip/src/include/lwip/arch.h:202:13: error: conflicting types for 'ssize_t' \ No newline at end of file
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX b/examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_LPC11UXX
+++ /dev/null
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_LPC13XX b/examples/device/net_lwip_webserver/.skip.MCU_LPC13XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_LPC13XX
+++ /dev/null
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX b/examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_MKL25ZXX
+++ /dev/null
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx b/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx
deleted file mode 100644
index 17600f062..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_MSP430x5xx
+++ /dev/null
@@ -1 +0,0 @@
-too many warnings for 16-bit integer overflow
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_NUC121 b/examples/device/net_lwip_webserver/.skip.MCU_NUC121
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_NUC121
+++ /dev/null
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_SAMD11 b/examples/device/net_lwip_webserver/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/net_lwip_webserver/.skip.MCU_STM32L0 b/examples/device/net_lwip_webserver/.skip.MCU_STM32L0
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/net_lwip_webserver/.skip.MCU_STM32L0
+++ /dev/null
diff --git a/examples/device/net_lwip_webserver/skip.txt b/examples/device/net_lwip_webserver/skip.txt
new file mode 100644
index 000000000..68761b058
--- /dev/null
+++ b/examples/device/net_lwip_webserver/skip.txt
@@ -0,0 +1,10 @@
+mcu:LPC11UXX
+mcu:LPC13XX
+mcu:MSP430x5xx
+mcu:NUC121
+mcu:SAMD11
+mcu:STM32L0
+mcu:MKL25ZXX
+family:broadcom_64bit
+family:broadcom_32bit
+board:curiosity_nano \ No newline at end of file
diff --git a/examples/device/uac2_headset/.skip.MCU_LPC11UXX b/examples/device/uac2_headset/.skip.MCU_LPC11UXX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/uac2_headset/.skip.MCU_LPC11UXX
+++ /dev/null
diff --git a/examples/device/uac2_headset/.skip.MCU_LPC13XX b/examples/device/uac2_headset/.skip.MCU_LPC13XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/uac2_headset/.skip.MCU_LPC13XX
+++ /dev/null
diff --git a/examples/device/uac2_headset/.skip.MCU_NUC121 b/examples/device/uac2_headset/.skip.MCU_NUC121
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/uac2_headset/.skip.MCU_NUC121
+++ /dev/null
diff --git a/examples/device/uac2_headset/.skip.MCU_SAMD11 b/examples/device/uac2_headset/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/uac2_headset/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/uac2_headset/.skip.MCU_SAME5X b/examples/device/uac2_headset/.skip.MCU_SAME5X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/uac2_headset/.skip.MCU_SAME5X
+++ /dev/null
diff --git a/examples/device/uac2_headset/.skip.MCU_SAMG b/examples/device/uac2_headset/.skip.MCU_SAMG
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/uac2_headset/.skip.MCU_SAMG
+++ /dev/null
diff --git a/examples/device/uac2_headset/skip.txt b/examples/device/uac2_headset/skip.txt
new file mode 100644
index 000000000..9471822a4
--- /dev/null
+++ b/examples/device/uac2_headset/skip.txt
@@ -0,0 +1,6 @@
+mcu:LPC11UXX
+mcu:LPC13XX
+mcu:NUC121
+mcu:SAMD11
+mcu:SAME5X
+mcu:SAMG \ No newline at end of file
diff --git a/examples/device/video_capture/.skip.MCU_MSP430x5xx b/examples/device/video_capture/.skip.MCU_MSP430x5xx
deleted file mode 100644
index 17600f062..000000000
--- a/examples/device/video_capture/.skip.MCU_MSP430x5xx
+++ /dev/null
@@ -1 +0,0 @@
-too many warnings for 16-bit integer overflow
diff --git a/examples/device/video_capture/.skip.MCU_SAMD11 b/examples/device/video_capture/.skip.MCU_SAMD11
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/device/video_capture/.skip.MCU_SAMD11
+++ /dev/null
diff --git a/examples/device/video_capture/skip.txt b/examples/device/video_capture/skip.txt
new file mode 100644
index 000000000..892a8c6a7
--- /dev/null
+++ b/examples/device/video_capture/skip.txt
@@ -0,0 +1,2 @@
+mcu:MSP430x5xx
+mcu:SAMD11 \ No newline at end of file
diff --git a/examples/host/cdc_msc_hid/.only.MCU_LPC175X_6X b/examples/host/cdc_msc_hid/.only.MCU_LPC175X_6X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_LPC175X_6X
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_LPC177X_8X b/examples/host/cdc_msc_hid/.only.MCU_LPC177X_8X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_LPC177X_8X
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_LPC18XX b/examples/host/cdc_msc_hid/.only.MCU_LPC18XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_LPC18XX
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_LPC40XX b/examples/host/cdc_msc_hid/.only.MCU_LPC40XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_LPC40XX
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_LPC43XX b/examples/host/cdc_msc_hid/.only.MCU_LPC43XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_LPC43XX
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_MIMXRT10XX b/examples/host/cdc_msc_hid/.only.MCU_MIMXRT10XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_MIMXRT10XX
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_MSP432E4 b/examples/host/cdc_msc_hid/.only.MCU_MSP432E4
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_MSP432E4
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/.only.MCU_RP2040 b/examples/host/cdc_msc_hid/.only.MCU_RP2040
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/cdc_msc_hid/.only.MCU_RP2040
+++ /dev/null
diff --git a/examples/host/cdc_msc_hid/only.txt b/examples/host/cdc_msc_hid/only.txt
new file mode 100644
index 000000000..db9a337e5
--- /dev/null
+++ b/examples/host/cdc_msc_hid/only.txt
@@ -0,0 +1,8 @@
+mcu:LPC175X_6X
+mcu:LPC177X_8X
+mcu:LPC18XX
+mcu:LPC40XX
+mcu:LPC43XX
+mcu:MIMXRT10XX
+mcu:RP2040
+mcu:MSP432E4 \ No newline at end of file
diff --git a/examples/host/hid_controller/.only.MCU_LPC175X_6X b/examples/host/hid_controller/.only.MCU_LPC175X_6X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_LPC175X_6X
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_LPC177X_8X b/examples/host/hid_controller/.only.MCU_LPC177X_8X
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_LPC177X_8X
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_LPC18XX b/examples/host/hid_controller/.only.MCU_LPC18XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_LPC18XX
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_LPC40XX b/examples/host/hid_controller/.only.MCU_LPC40XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_LPC40XX
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_LPC43XX b/examples/host/hid_controller/.only.MCU_LPC43XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_LPC43XX
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_MIMXRT10XX b/examples/host/hid_controller/.only.MCU_MIMXRT10XX
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_MIMXRT10XX
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_MSP432E4 b/examples/host/hid_controller/.only.MCU_MSP432E4
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_MSP432E4
+++ /dev/null
diff --git a/examples/host/hid_controller/.only.MCU_RP2040 b/examples/host/hid_controller/.only.MCU_RP2040
deleted file mode 100644
index e69de29bb..000000000
--- a/examples/host/hid_controller/.only.MCU_RP2040
+++ /dev/null
diff --git a/examples/host/hid_controller/only.txt b/examples/host/hid_controller/only.txt
new file mode 100644
index 000000000..db9a337e5
--- /dev/null
+++ b/examples/host/hid_controller/only.txt
@@ -0,0 +1,8 @@
+mcu:LPC175X_6X
+mcu:LPC177X_8X
+mcu:LPC18XX
+mcu:LPC40XX
+mcu:LPC43XX
+mcu:MIMXRT10XX
+mcu:RP2040
+mcu:MSP432E4 \ No newline at end of file
diff --git a/hw/bsp/samd21/boards/curiosity_nano/.skip.device.net_lwip_webserver b/hw/bsp/samd21/boards/curiosity_nano/.skip.device.net_lwip_webserver
deleted file mode 100644
index e69de29bb..000000000
--- a/hw/bsp/samd21/boards/curiosity_nano/.skip.device.net_lwip_webserver
+++ /dev/null
diff --git a/tools/build_board.py b/tools/build_board.py
index 9397c754f..b2a80c680 100644
--- a/tools/build_board.py
+++ b/tools/build_board.py
@@ -4,6 +4,8 @@ import sys
import subprocess
import time
+import build_utils
+
SUCCEEDED = "\033[32msucceeded\033[0m"
FAILED = "\033[31mfailed\033[0m"
SKIPPED = "\033[33mskipped\033[0m"
@@ -50,7 +52,7 @@ def build_board(example, board):
sram_size = "-"
# Check if board is skipped
- if skip_example(example, board):
+ if build_utils.skip_example(example, board):
success = SKIPPED
skip_count += 1
print(build_format.format(example, board, success, '-', flash_size, sram_size))
@@ -82,33 +84,6 @@ def build_size(example, board):
sram_size = int(size_list[1]) + int(size_list[2])
return (flash_size, sram_size)
-def skip_example(example, board):
- ex_dir = 'examples/' + example
- board_mk = 'hw/bsp/{}/board.mk'.format(board)
- with open(board_mk) as mk:
- mk_contents = mk.read()
-
- # Skip all OPT_MCU_NONE these are WIP port
- if '-DCFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
- return 1
-
- # Skip if CFG_TUSB_MCU in board.mk to match skip file
- for skip_file in glob.iglob(ex_dir + '/.skip.MCU_*'):
- mcu_cflag = '-DCFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2]
- if mcu_cflag in mk_contents:
- return 1
-
- # Build only list, if exists only these MCU are built
- only_list = list(glob.iglob(ex_dir + '/.only.MCU_*'))
- if len(only_list) > 0:
- for only_file in only_list:
- mcu_cflag = '-DCFG_TUSB_MCU=OPT_' + os.path.basename(only_file).split('.')[2]
- if mcu_cflag in mk_contents:
- return 0
- return 1
-
- return 0
-
print(build_separator)
print(build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
diff --git a/tools/build_esp32sx.py b/tools/build_esp32sx.py
index 91953f080..2947a0a6b 100644
--- a/tools/build_esp32sx.py
+++ b/tools/build_esp32sx.py
@@ -4,6 +4,8 @@ import sys
import subprocess
import time
+import build_utils
+
SUCCEEDED = "\033[32msucceeded\033[0m"
FAILED = "\033[31mfailed\033[0m"
SKIPPED = "\033[33mskipped\033[0m"
@@ -51,7 +53,7 @@ def build_board(example, board):
sram_size = "-"
# Check if board is skipped
- if skip_example(example, board):
+ if build_utils.skip_example(example, board):
success = SKIPPED
skip_count += 1
print(build_format.format(example, board, success, '-', flash_size, sram_size))
@@ -83,9 +85,6 @@ def build_size(example, board):
sram_size = int(size_list[1]) + int(size_list[2])
return (flash_size, sram_size)
-def skip_example(example, board):
- return 0
-
print(build_separator)
print(build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
print(build_separator)
diff --git a/tools/build_family.py b/tools/build_family.py
index ccbcfa3f8..4094d07db 100644
--- a/tools/build_family.py
+++ b/tools/build_family.py
@@ -4,6 +4,8 @@ import sys
import subprocess
import time
+import build_utils
+
SUCCEEDED = "\033[32msucceeded\033[0m"
FAILED = "\033[31mfailed\033[0m"
SKIPPED = "\033[33mskipped\033[0m"
@@ -62,7 +64,7 @@ def build_board(example, board):
sram_size = "-"
# Check if board is skipped
- if skip_example(example, board):
+ if build_utils.skip_example(example, board):
success = SKIPPED
skip_count += 1
print(build_format.format(example, board, success, '-', flash_size, sram_size))
@@ -95,46 +97,6 @@ def build_size(example, board):
sram_size = int(size_list[1]) + int(size_list[2])
return (flash_size, sram_size)
-def skip_example(example, board):
- ex_dir = 'examples/' + example
-
- # Check if example is skipped by family or board directory
- skip_file = ".skip." + example.replace('/', '.');
- if os.path.isfile("hw/bsp/{}/{}".format(family, skip_file)) or os.path.isfile("hw/bsp/{}/boards/{}/{}".format(family, board, skip_file)):
- return 1
-
- # Otherwise check if mcu is excluded by example directory
-
- # family CMake
- family_mk = 'hw/bsp/{}/family.cmake'.format(family)
-
- # family.mk
- if not os.path.exists(family_mk):
- family_mk = 'hw/bsp/{}/family.mk'.format(family)
-
- with open(family_mk) as mk:
- mk_contents = mk.read()
-
- # Skip all OPT_MCU_NONE these are WIP port
- if 'CFG_TUSB_MCU=OPT_MCU_NONE' in mk_contents:
- return 1
-
- # Skip if CFG_TUSB_MCU in family.mk to match skip file
- for skip_file in glob.iglob(ex_dir + '/.skip.MCU_*'):
- mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(skip_file).split('.')[2]
- if mcu_cflag in mk_contents:
- return 1
-
- # Build only list, if exists only these MCU are built
- only_list = list(glob.iglob(ex_dir + '/.only.MCU_*'))
- if len(only_list) > 0:
- for only_file in only_list:
- mcu_cflag = 'CFG_TUSB_MCU=OPT_' + os.path.basename(only_file).split('.')[2]
- if mcu_cflag in mk_contents:
- return 0
- return 1
- return 0
-
print(build_separator)
print(build_format.format('Example', 'Board', '\033[39mResult\033[0m', 'Time', 'Flash', 'SRAM'))
diff --git a/tools/build_utils.py b/tools/build_utils.py
new file mode 100644
index 000000000..299fffa4d
--- /dev/null
+++ b/tools/build_utils.py
@@ -0,0 +1,61 @@
+import pathlib
+
+def skip_example(example, board):
+ ex_dir = pathlib.Path('examples/') / example
+ bsp = pathlib.Path("hw/bsp")
+
+ board_dir = list(bsp.glob("*/boards/" + board))
+ if not board_dir:
+ # Skip unknown boards
+ return True
+
+ board_dir = list(board_dir)[0]
+
+ family_dir = board_dir.parent.parent
+ family = family_dir.name
+
+ # family CMake
+ family_mk = family_dir / "family.cmake"
+
+ # family.mk
+ if not family_mk.exists():
+ family_mk = family_dir / "family.mk"
+
+ mk_contents = family_mk.read_text()
+
+ # Find the mcu
+ if "CFG_TUSB_MCU=OPT_MCU_" not in mk_contents:
+ board_mk = board_dir / "board.cmake"
+ if not board_mk.exists():
+ board_mk = board_dir / "board.mk"
+
+ mk_contents = board_mk.read_text()
+
+ for token in mk_contents.split():
+ if "CFG_TUSB_MCU=OPT_MCU_" in token:
+ # Strip " because cmake files has them.
+ token = token.strip("\"")
+ _, opt_mcu = token.split("=")
+ mcu = opt_mcu[len("OPT_MCU_"):]
+
+ # Skip all OPT_MCU_NONE these are WIP port
+ if mcu == "NONE":
+ return True
+
+ skip_file = ex_dir / "skip.txt"
+ only_file = ex_dir / "only.txt"
+
+ if skip_file.exists() and only_file.exists():
+ raise RuntimeError("Only have a skip or only file. Not both.")
+ elif skip_file.exists():
+ skips = skip_file.read_text().split()
+ return ("mcu:" + mcu in skips or
+ "board:" + board in skips or
+ "family:" + family in skips)
+ elif only_file.exists():
+ onlys = only_file.read_text().split()
+ return not ("mcu:" + mcu in onlys or
+ "board:" + board in onlys or
+ "family:" + family in onlys)
+
+ return False