From 565263ef1c8744232561ce297dabbdff3e3d284c Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 21 Aug 2026 11:06:26 +0700 Subject: samd2x_l2x: build hcd_samd.c for samd21 only, as family.mk already does family.cmake listed src/portable/microchip/samd/hcd_samd.c twice: once unconditionally, and once inside `if(SAM_FAMILY STREQUAL "samd21")` under the comment "Add HCD support for SAMD21 (has host capability)". The unconditional copy defeated the gate, so cmake compiled the host controller driver for saml21 and saml22 while family.mk compiled it for samd21 alone - and SAML22 has no host controller at all (hcd_samd.c fails there with `unknown type name 'UsbHostDescriptor'`). Nothing built the host examples on this family, so the divergence was invisible; the next commit makes it matter. --- hw/bsp/samd2x_l2x/family.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/bsp/samd2x_l2x/family.cmake b/hw/bsp/samd2x_l2x/family.cmake index 76371ccdc..2edcea0cd 100644 --- a/hw/bsp/samd2x_l2x/family.cmake +++ b/hw/bsp/samd2x_l2x/family.cmake @@ -106,7 +106,6 @@ function(family_configure_example TARGET RTOS) ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../board.c ${TOP}/src/portable/microchip/samd/dcd_samd.c - ${TOP}/src/portable/microchip/samd/hcd_samd.c ${STARTUP_FILE_${CMAKE_C_COMPILER_ID}} ) # Add HCD support for SAMD21 (has host capability) -- cgit v1.3.1