Fix USB configuration for Zephyr 4.2.0

- Use CONFIG_USB_DEVICE_STACK_NEXT (new USB stack)
- Replace CONFIG_USB_CDC_ACM with CONFIG_USBD_CDC_ACM_CLASS
- Remove deprecated CONFIG_USB_DEVICE_COMPOSITE
- Add CONFIG_HAS_STM32CUBE=y to defconfig (required for USB)
- Remove networking configs (not needed for basic USB CDC)
- Based on actual Zephyr 4.2.0 samples
This commit is contained in:
Eduard Iten 2025-12-08 12:01:41 +01:00
parent 05a25c3900
commit 8051f18b9b
2 changed files with 10 additions and 13 deletions

View File

@ -1,5 +1,8 @@
# EWS Board Configuration
# Enable STM32Cube (required for USB)
CONFIG_HAS_STM32CUBE=y
# Enable GPIO
CONFIG_GPIO=y

View File

@ -1,28 +1,22 @@
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_COMPOSITE=y
# USB Device Stack (Next Generation)
CONFIG_USB_DEVICE_STACK_NEXT=y
# USB CDC ACM
CONFIG_USB_CDC_ACM=y
CONFIG_USBD_CDC_ACM_CLASS=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=n
CONFIG_USB_UART_CONSOLE=y
CONFIG_UART_LINE_CTRL=y
# CAN configuration
CONFIG_CAN=y
CONFIG_CAN_FD_MODE=y
# Networking for gs_usb
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_CAN=y
# GPIO for PFET control
CONFIG_GPIO=y
# Logging
CONFIG_LOG=y
CONFIG_USB_DEVICE_LOG_LEVEL_DBG=y
CONFIG_USBD_LOG_LEVEL_ERR=y
CONFIG_UDC_DRIVER_LOG_LEVEL_ERR=y
# System
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048