mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-16 15:52:54 +00:00
Production (LOG=n, ASSERT=n, RTT=n, reboot-on-fatal) is now the prj.conf default; debug.conf is the opt-in bundle. Removed prod.conf and the logging.conf auto-include; relocated RTT/ASSERT out of the always-on platform confs so they no longer override the prod defaults. Add CONFIG_ZEPHCORE_COMPANION_USB so the USB CDC companion transport compiles independently of logging (default-y on USB-capable companions, opt-in on ESP32-S3 via esp32s3_usb.conf). Gate all USB sites behind one ZEPHCORE_USB_STACK macro. Rework BLE/USB interface arbitration to first-come-first-served: neither transport evicts a live session. Make active_iface mutation thread-safe (mutex + atomic claim) across the BLE callback thread and USB workqueue. Share the ESP32-S3 USB OTG / console DTS via common dtsi includes; enable uart0 (GPIO43/44) on station_g2 and xiao so the console reroute works.
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
# ESP32-S3 USB CDC-ACM companion support
|
|
#
|
|
# ESP32-S3 has a DWC2 USB OTG peripheral (snps,dwc2 compatible) that supports
|
|
# the Zephyr USB NEXT stack. This conf enables it and turns on the companion
|
|
# USB transport on S3 boards. Do NOT use on ESP32 (original) or C3/C6 — those
|
|
# chips have no DWC2 controller.
|
|
#
|
|
# Build with:
|
|
# -DEXTRA_CONF_FILE="boards/common/esp32s3_usb.conf"
|
|
#
|
|
# Also add the cdc_acm_uart DTS node to the board overlay (the overlays include
|
|
# boards/common/esp32s3_usb_otg.dtsi). Without the DT node,
|
|
# DT_HAS_COMPAT_STATUS_OKAY(zephyr_cdc_acm_uart) is false and
|
|
# zephcore_usbd_init() is compiled out at the #if check.
|
|
|
|
CONFIG_USB_DEVICE_STACK_NEXT=y
|
|
CONFIG_ZEPHCORE_COMPANION_USB=y
|
|
CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT=n
|
|
CONFIG_UART_LINE_CTRL=y
|
|
|
|
# Disable USB Serial/JTAG so it doesn't fight USB OTG for the D+/D- pins.
|
|
# ESP32-S3 has an internal mux — only one controller can own the port at a time.
|
|
# With USB companion active, the port IS the companion protocol channel.
|
|
CONFIG_ESP_USB_SERIAL_JTAG_ENABLED=n
|