build: enable USB CDC companion transport for ESP32-S3 boards - #77
build: enable USB CDC companion transport for ESP32-S3 boards#77JCBird1012 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new board-matching logic is fragile/unanchored and doesn’t deterministically implement the “overlay includes esp32s3_usb_otg.dtsi” intent, which can lead to accidental matches and harder-to-maintain behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the ESP32 companion build flow to optionally add an ESP32-S3 USB CDC-ACM configuration during companion builds, enabling companion protocol operation over native USB (e.g., for Web Serial control) on selected ESP32-S3 boards.
Changes:
- Adds logic in the ESP32 companions build path to optionally set
EXTRA_CONF_FILEtoboards/common/esp32s3_usb.conf. - Adds explanatory comments and logging indicating when the USB CDC companion transport is enabled.
File summaries
| File | Description |
|---|---|
| build.sh | Adds conditional injection of boards/common/esp32s3_usb.conf during ESP32 companion sysbuild builds to enable USB CDC-ACM transport on ESP32-S3 boards. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to the ESP32 companion build path, uses an existing config file, and gates behavior on explicit DTS overlay inclusion for ESP32-S3 boards.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
ESP32-S3 boards that include
esp32s3_usb_otg.dtsiin their overlay now getboards/common/esp32s3_usb.confpassed automatically during companion builds. This enables the full companion protocol over native USB (CDC-ACM), allowing Web Serial apps (app.meshcore.io) to control the device over USB in addition to BLE.Affected boards: heltec_wifi_lora32_v4, heltec_wifi_lora32_v43, heltec_wireless_tracker_v2, xiao_esp32s3, lilygo_t3s3, station_g2.
Boards without the OTG DTSI (Heltec V3/CP2102, Wireless Tracker V1,C3/C6, classic ESP32) aren't affected.