From a57f857f811e054e7a240fc55520648192349c2b Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 21 Aug 2026 11:06:14 +0700 Subject: vendor: remove the obsolete host vendor driver vendor_host.c/.h implemented a CFG_TUH_VENDOR class driver that no example, board or test ever enabled: usbh's driver table entry was compiled out everywhere, and the six tusb_config.h files that mentioned the macro all set it to 0. Maintainer call - dead code, not a shrinking of supported classes. Removes the sources, the usbh driver-table entry, the CFG_TUH_VENDOR default in tusb_option.h, the tusb.h include, both build-system source lists, the rp2040 family.cmake entry and the IAR project template rows. --- examples/host/cdc_msc_hid/src/tusb_config.h | 1 - examples/host/cdc_msc_hid_freertos/src/tusb_config.h | 1 - examples/host/hid_controller/src/tusb_config.h | 1 - examples/host/msc_file_explorer/src/tusb_config.h | 1 - examples/host/msc_file_explorer_freertos/src/tusb_config.h | 1 - 5 files changed, 5 deletions(-) (limited to 'examples/host') diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index 26fcdd1cb..a05fcc9bb 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -113,7 +113,6 @@ #define CFG_TUH_CDC_PL2303 1 // PL2303 Serial. PL2303 is not part of CDC class, only to re-use CDC driver API #define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 1 -#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/cdc_msc_hid_freertos/src/tusb_config.h b/examples/host/cdc_msc_hid_freertos/src/tusb_config.h index 8583e7176..e269357b0 100644 --- a/examples/host/cdc_msc_hid_freertos/src/tusb_config.h +++ b/examples/host/cdc_msc_hid_freertos/src/tusb_config.h @@ -115,7 +115,6 @@ #define CFG_TUH_CDC_PL2303 1 // PL2303 Serial. PL2303 is not part of CDC class, only to re-use CDC driver API #define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 1 -#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/hid_controller/src/tusb_config.h b/examples/host/hid_controller/src/tusb_config.h index a5c202fda..e12ff36c8 100644 --- a/examples/host/hid_controller/src/tusb_config.h +++ b/examples/host/hid_controller/src/tusb_config.h @@ -106,7 +106,6 @@ #define CFG_TUH_CDC 0 #define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 0 -#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/msc_file_explorer/src/tusb_config.h b/examples/host/msc_file_explorer/src/tusb_config.h index a9d24c89f..f929d49fb 100644 --- a/examples/host/msc_file_explorer/src/tusb_config.h +++ b/examples/host/msc_file_explorer/src/tusb_config.h @@ -106,7 +106,6 @@ #define CFG_TUH_MSC 1 #define CFG_TUH_CDC 0 #define CFG_TUH_HID 0 // typical keyboard + mouse device can have 3-4 HID interfaces -#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/msc_file_explorer_freertos/src/tusb_config.h b/examples/host/msc_file_explorer_freertos/src/tusb_config.h index c3fc4624f..905aeba0b 100644 --- a/examples/host/msc_file_explorer_freertos/src/tusb_config.h +++ b/examples/host/msc_file_explorer_freertos/src/tusb_config.h @@ -111,7 +111,6 @@ #define CFG_TUH_MSC 1 #define CFG_TUH_CDC 0 #define CFG_TUH_HID 0 // typical keyboard + mouse device can have 3-4 HID interfaces -#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) -- cgit v1.3.1 From b646a9decfcac5345b77c74b6b0e2d217add756f Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 21 Aug 2026 11:06:38 +0700 Subject: examples: restore host builds on samd2x_l2x Nine examples/host/*/only.txt gate on family:samd21, but 2a8811ebb merged the samd2x and saml2x BSPs into hw/bsp/samd2x_l2x. skip_example takes `family:` from the directory name, so since that rename every one of these examples has been skipped on every board of the family, under make as well as cmake - although hw/bsp/samd2x_l2x/family.cmake wires src/portable/microchip/samd/hcd_samd.c. 107 host firmware images were being compiled nowhere. The merged family is wider than the old samd21 one, so three boards need an explicit skip rather than the rename alone: atsaml21_xpro, saml22_feather, sensorwatch_m0 - not samd21, so hcd_samd.c is not compiled for them (previous commit); SAML22 has no host controller at all curiosity_nano - SAMD21 with 16 KB RAM; msc_file_explorer_freertos overflows it by 3688 bytes (ram 122.51%). Only that one example; the other eight fit. Verified across the whole family: cmake 11 boards x 9/9 examples + curiosity_nano 8/9, three boards skipped, 0 failures; make 98 OK / 0 failed (was 98/9 before). Device examples on saml21 and saml22 are unaffected. --- examples/host/bare_api/only.txt | 2 +- examples/host/bare_api/skip.txt | 3 +++ examples/host/cdc_msc_hid/only.txt | 2 +- examples/host/cdc_msc_hid/skip.txt | 3 +++ examples/host/cdc_msc_hid_freertos/only.txt | 2 +- examples/host/cdc_msc_hid_freertos/skip.txt | 3 +++ examples/host/device_info/only.txt | 2 +- examples/host/device_info/skip.txt | 3 +++ examples/host/hid_controller/only.txt | 2 +- examples/host/hid_controller/skip.txt | 3 +++ examples/host/midi2_host/only.txt | 2 +- examples/host/midi2_host/skip.txt | 3 +++ examples/host/midi_rx/only.txt | 2 +- examples/host/midi_rx/skip.txt | 3 +++ examples/host/msc_file_explorer/only.txt | 2 +- examples/host/msc_file_explorer/skip.txt | 3 +++ examples/host/msc_file_explorer_freertos/only.txt | 2 +- examples/host/msc_file_explorer_freertos/skip.txt | 4 ++++ 18 files changed, 37 insertions(+), 9 deletions(-) (limited to 'examples/host') diff --git a/examples/host/bare_api/only.txt b/examples/host/bare_api/only.txt index a2ff93be5..3287df65a 100644 --- a/examples/host/bare_api/only.txt +++ b/examples/host/bare_api/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/bare_api/skip.txt b/examples/host/bare_api/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/bare_api/skip.txt +++ b/examples/host/bare_api/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/cdc_msc_hid/only.txt b/examples/host/cdc_msc_hid/only.txt index a2f4f273a..c4a23328e 100644 --- a/examples/host/cdc_msc_hid/only.txt +++ b/examples/host/cdc_msc_hid/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/cdc_msc_hid/skip.txt b/examples/host/cdc_msc_hid/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/cdc_msc_hid/skip.txt +++ b/examples/host/cdc_msc_hid/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/cdc_msc_hid_freertos/only.txt b/examples/host/cdc_msc_hid_freertos/only.txt index 4ab8a906e..09b0125b0 100644 --- a/examples/host/cdc_msc_hid_freertos/only.txt +++ b/examples/host/cdc_msc_hid_freertos/only.txt @@ -1,5 +1,5 @@ family:espressif -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:LPC175X_6X mcu:LPC177X_8X diff --git a/examples/host/cdc_msc_hid_freertos/skip.txt b/examples/host/cdc_msc_hid_freertos/skip.txt index f0be07d25..f5fe146c8 100644 --- a/examples/host/cdc_msc_hid_freertos/skip.txt +++ b/examples/host/cdc_msc_hid_freertos/skip.txt @@ -1,3 +1,6 @@ mcu:CH32F20X board:lpcxpresso54114 mcu:FT90X +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/device_info/only.txt b/examples/host/device_info/only.txt index 7f30218df..2c9c8834a 100644 --- a/examples/host/device_info/only.txt +++ b/examples/host/device_info/only.txt @@ -1,6 +1,6 @@ family:espressif family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/device_info/skip.txt b/examples/host/device_info/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/device_info/skip.txt +++ b/examples/host/device_info/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/hid_controller/only.txt b/examples/host/hid_controller/only.txt index 45ca6846f..7b4f14863 100644 --- a/examples/host/hid_controller/only.txt +++ b/examples/host/hid_controller/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/hid_controller/skip.txt b/examples/host/hid_controller/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/hid_controller/skip.txt +++ b/examples/host/hid_controller/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/midi2_host/only.txt b/examples/host/midi2_host/only.txt index c71aacd87..8ffe1cd04 100644 --- a/examples/host/midi2_host/only.txt +++ b/examples/host/midi2_host/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:ESP32P4 diff --git a/examples/host/midi2_host/skip.txt b/examples/host/midi2_host/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/midi2_host/skip.txt +++ b/examples/host/midi2_host/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/midi_rx/only.txt b/examples/host/midi_rx/only.txt index 65ef8fac9..b467c6e3b 100644 --- a/examples/host/midi_rx/only.txt +++ b/examples/host/midi_rx/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:ESP32P4 diff --git a/examples/host/midi_rx/skip.txt b/examples/host/midi_rx/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/midi_rx/skip.txt +++ b/examples/host/midi_rx/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/msc_file_explorer/only.txt b/examples/host/msc_file_explorer/only.txt index a2ff93be5..3287df65a 100644 --- a/examples/host/msc_file_explorer/only.txt +++ b/examples/host/msc_file_explorer/only.txt @@ -1,5 +1,5 @@ family:hpmicro -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:CH32V20X mcu:KINETIS_KL diff --git a/examples/host/msc_file_explorer/skip.txt b/examples/host/msc_file_explorer/skip.txt index 308796869..dc3c2981d 100644 --- a/examples/host/msc_file_explorer/skip.txt +++ b/examples/host/msc_file_explorer/skip.txt @@ -1 +1,4 @@ board:lpcxpresso54114 +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 diff --git a/examples/host/msc_file_explorer_freertos/only.txt b/examples/host/msc_file_explorer_freertos/only.txt index 519ac2ebd..4f4f8fe6b 100644 --- a/examples/host/msc_file_explorer_freertos/only.txt +++ b/examples/host/msc_file_explorer_freertos/only.txt @@ -1,5 +1,5 @@ family:espressif -family:samd21 +family:samd2x_l2x family:samd5x_e5x mcu:LPC175X_6X mcu:LPC177X_8X diff --git a/examples/host/msc_file_explorer_freertos/skip.txt b/examples/host/msc_file_explorer_freertos/skip.txt index a8c9bea2a..06afcf825 100644 --- a/examples/host/msc_file_explorer_freertos/skip.txt +++ b/examples/host/msc_file_explorer_freertos/skip.txt @@ -2,3 +2,7 @@ mcu:CH32F20X board:lpcxpresso54114 mcu:FT90X board:stm32h7s3nucleo +board:atsaml21_xpro +board:saml22_feather +board:sensorwatch_m0 +board:curiosity_nano -- cgit v1.3.1 From c8e0e94d889cd9b9a423d36c2b194d50805d8272 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 21 Aug 2026 17:04:34 +0700 Subject: examples: keep CFG_TUH_VENDOR 0 in tusb_config.h Removing the obsolete host vendor driver also dropped the `#define CFG_TUH_VENDOR 0` line from the six example configs that carried it. Put it back: host vendor is coming, and the configs are where a reader looks for the set of host classes an example can turn on. Restored byte-identical to the pre-removal state, each file keeping its own column alignment. The define is inert today - nothing under src/, hw/ or tools/ reads CFG_TUH_VENDOR - and it is 0 everywhere, so ci_select still reads the vendor class as enabled by no example and a change to it still selects nothing. Note the option's default in src/tusb_option.h is still gone; implementing the driver will need that back alongside the usbh driver-table entry. --- examples/dual/dynamic_switch/src/tusb_config.h | 1 + examples/host/cdc_msc_hid/src/tusb_config.h | 1 + examples/host/cdc_msc_hid_freertos/src/tusb_config.h | 1 + examples/host/hid_controller/src/tusb_config.h | 1 + examples/host/msc_file_explorer/src/tusb_config.h | 1 + examples/host/msc_file_explorer_freertos/src/tusb_config.h | 1 + 6 files changed, 6 insertions(+) (limited to 'examples/host') diff --git a/examples/dual/dynamic_switch/src/tusb_config.h b/examples/dual/dynamic_switch/src/tusb_config.h index c570a2499..f3e016305 100644 --- a/examples/dual/dynamic_switch/src/tusb_config.h +++ b/examples/dual/dynamic_switch/src/tusb_config.h @@ -148,6 +148,7 @@ extern "C" { #define CFG_TUH_CDC 0 #define CFG_TUH_HID 0 #define CFG_TUH_MSC 0 +#define CFG_TUH_VENDOR 0 // max endpoint pair supported by each device #define CFG_TUH_ENDPOINT_MAX 16 diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h index a05fcc9bb..26fcdd1cb 100644 --- a/examples/host/cdc_msc_hid/src/tusb_config.h +++ b/examples/host/cdc_msc_hid/src/tusb_config.h @@ -113,6 +113,7 @@ #define CFG_TUH_CDC_PL2303 1 // PL2303 Serial. PL2303 is not part of CDC class, only to re-use CDC driver API #define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 1 +#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/cdc_msc_hid_freertos/src/tusb_config.h b/examples/host/cdc_msc_hid_freertos/src/tusb_config.h index e269357b0..8583e7176 100644 --- a/examples/host/cdc_msc_hid_freertos/src/tusb_config.h +++ b/examples/host/cdc_msc_hid_freertos/src/tusb_config.h @@ -115,6 +115,7 @@ #define CFG_TUH_CDC_PL2303 1 // PL2303 Serial. PL2303 is not part of CDC class, only to re-use CDC driver API #define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 1 +#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/hid_controller/src/tusb_config.h b/examples/host/hid_controller/src/tusb_config.h index e12ff36c8..a5c202fda 100644 --- a/examples/host/hid_controller/src/tusb_config.h +++ b/examples/host/hid_controller/src/tusb_config.h @@ -106,6 +106,7 @@ #define CFG_TUH_CDC 0 #define CFG_TUH_HID (3*CFG_TUH_DEVICE_MAX) // typical keyboard + mouse device can have 3-4 HID interfaces #define CFG_TUH_MSC 0 +#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/msc_file_explorer/src/tusb_config.h b/examples/host/msc_file_explorer/src/tusb_config.h index f929d49fb..a9d24c89f 100644 --- a/examples/host/msc_file_explorer/src/tusb_config.h +++ b/examples/host/msc_file_explorer/src/tusb_config.h @@ -106,6 +106,7 @@ #define CFG_TUH_MSC 1 #define CFG_TUH_CDC 0 #define CFG_TUH_HID 0 // typical keyboard + mouse device can have 3-4 HID interfaces +#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) diff --git a/examples/host/msc_file_explorer_freertos/src/tusb_config.h b/examples/host/msc_file_explorer_freertos/src/tusb_config.h index 905aeba0b..c3fc4624f 100644 --- a/examples/host/msc_file_explorer_freertos/src/tusb_config.h +++ b/examples/host/msc_file_explorer_freertos/src/tusb_config.h @@ -111,6 +111,7 @@ #define CFG_TUH_MSC 1 #define CFG_TUH_CDC 0 #define CFG_TUH_HID 0 // typical keyboard + mouse device can have 3-4 HID interfaces +#define CFG_TUH_VENDOR 0 // max device support (excluding hub device): 1 hub typically has 4 ports #define CFG_TUH_DEVICE_MAX (3*CFG_TUH_HUB + 1) -- cgit v1.3.1