From 818af7679a9bc4ad76d699726d80c23062572f9c Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 30 Dec 2025 13:35:19 +0000 Subject: [PATCH 1/3] app: do not enable USB composite device option CANnectivity is a single-function USB device. Remove the Kconfig option for marking it as a composite USB device. This was forgotten in commit 46334813d14fb867faafcf37103d3c73c68afb69. Signed-off-by: Henrik Brix Andersen --- app/prj_release.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/app/prj_release.conf b/app/prj_release.conf index 06cc288..a3eb661 100644 --- a/app/prj_release.conf +++ b/app/prj_release.conf @@ -12,7 +12,6 @@ CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT=y CONFIG_FAULT_DUMP=0 CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_COMPOSITE_DEVICE=y CONFIG_USB_DEVICE_BOS=y CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n From 2cdfc511ed78ed5c3639859e197be920c5c2a737 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 30 Dec 2025 13:35:54 +0000 Subject: [PATCH 2/3] tests: usb: gs_usb: host: do not enable USB composite device option The gs_usb host test suite is a single-function USB device. Remove the Kconfig option for marking it as a composite USB device. This was forgotten in commit 46334813d14fb867faafcf37103d3c73c68afb69. Signed-off-by: Henrik Brix Andersen --- tests/subsys/usb/gs_usb/host/prj.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/subsys/usb/gs_usb/host/prj.conf b/tests/subsys/usb/gs_usb/host/prj.conf index ae2d641..b089c0a 100644 --- a/tests/subsys/usb/gs_usb/host/prj.conf +++ b/tests/subsys/usb/gs_usb/host/prj.conf @@ -13,7 +13,6 @@ CONFIG_SHELL=y CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_BOS=y CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n -CONFIG_USB_COMPOSITE_DEVICE=y CONFIG_CAN=y CONFIG_CAN_FD_MODE=y From 6a2703a56b2bd5085bb3993ec8e679628b25d262 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 30 Dec 2025 13:50:20 +0000 Subject: [PATCH 3/3] app: move common configuration to Kconfig file Move the common configuration shared between the various prj*.conf files to the Kconfig file. Signed-off-by: Henrik Brix Andersen --- app/Kconfig | 9 +++++++++ app/prj.conf | 9 ++------- app/prj_release.conf | 8 +------- app/prj_usbd_next.conf | 8 +++----- app/prj_usbd_next_release.conf | 11 ++++------- 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index 6ffe7d5..06fe408 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -7,6 +7,9 @@ module = CANNECTIVITY module-str = CANnectivity source "subsys/logging/Kconfig.template.log_config" +configdefault CAN_FD_MODE + default y + config CANNECTIVITY_BOOT_BANNER bool "CANnectivity boot banner" default y if BOOT_BANNER @@ -87,6 +90,12 @@ configdefault USB_MAX_POWER configdefault USB_DEVICE_GS_USB_MAX_CHANNELS default CANNECTIVITY_MAX_CHANNELS +configdefault USB_DEVICE_BOS + default y + +configdefault USB_DEVICE_INITIALIZE_AT_BOOT + default n + endif # USB_DEVICE_STACK if USB_DEVICE_STACK_NEXT diff --git a/app/prj.conf b/app/prj.conf index 7540da1..10315f3 100644 --- a/app/prj.conf +++ b/app/prj.conf @@ -1,15 +1,10 @@ # This is using the deprecated USB device stack CONFIG_DEPRECATION_TEST=y +CONFIG_USB_DEVICE_STACK=y +# Logging configuration CONFIG_LOG=y CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y CONFIG_USB_DEVICE_GS_USB_LOG_LEVEL_DBG=y CONFIG_CANNECTIVITY_LOG_LEVEL_DBG=y - -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_DEVICE_BOS=y -CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n - -CONFIG_CAN=y -CONFIG_CAN_FD_MODE=y diff --git a/app/prj_release.conf b/app/prj_release.conf index a3eb661..706e911 100644 --- a/app/prj_release.conf +++ b/app/prj_release.conf @@ -1,5 +1,6 @@ # This is using the deprecated USB device stack CONFIG_DEPRECATION_TEST=y +CONFIG_USB_DEVICE_STACK=y # Hardened configuration CONFIG_BOOT_BANNER=n @@ -10,10 +11,3 @@ CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT=y # Arm-specific hardened configuration CONFIG_FAULT_DUMP=0 - -CONFIG_USB_DEVICE_STACK=y -CONFIG_USB_DEVICE_BOS=y -CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n - -CONFIG_CAN=y -CONFIG_CAN_FD_MODE=y diff --git a/app/prj_usbd_next.conf b/app/prj_usbd_next.conf index fa77980..2ca0e8f 100644 --- a/app/prj_usbd_next.conf +++ b/app/prj_usbd_next.conf @@ -1,12 +1,10 @@ +# This is using the experimental USB device_next stack class CONFIG_WARN_EXPERIMENTAL=y +CONFIG_USB_DEVICE_STACK_NEXT=y +# Logging configuration CONFIG_LOG=y CONFIG_UDC_DRIVER_LOG_LEVEL_WRN=y CONFIG_USBD_LOG_LEVEL_WRN=y CONFIG_USBD_GS_USB_LOG_LEVEL_DBG=y CONFIG_CANNECTIVITY_LOG_LEVEL_DBG=y - -CONFIG_USB_DEVICE_STACK_NEXT=y - -CONFIG_CAN=y -CONFIG_CAN_FD_MODE=y diff --git a/app/prj_usbd_next_release.conf b/app/prj_usbd_next_release.conf index babbca9..d01bc58 100644 --- a/app/prj_usbd_next_release.conf +++ b/app/prj_usbd_next_release.conf @@ -1,3 +1,7 @@ +# This is using the experimental USB device_next stack class +CONFIG_WARN_EXPERIMENTAL=y +CONFIG_USB_DEVICE_STACK_NEXT=y + # Hardened configuration CONFIG_BOOT_BANNER=n CONFIG_BUILD_OUTPUT_STRIPPED=y @@ -7,10 +11,3 @@ CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT=y # Arm-specific hardened configuration CONFIG_FAULT_DUMP=0 - -CONFIG_WARN_EXPERIMENTAL=y - -CONFIG_USB_DEVICE_STACK_NEXT=y - -CONFIG_CAN=y -CONFIG_CAN_FD_MODE=y