Skip to content

build: enable USB CDC companion transport for ESP32-S3 boards - #77

Open
JCBird1012 wants to merge 2 commits into
liquidraver:devfrom
JCBird1012:dev
Open

build: enable USB CDC companion transport for ESP32-S3 boards#77
JCBird1012 wants to merge 2 commits into
liquidraver:devfrom
JCBird1012:dev

Conversation

@JCBird1012

Copy link
Copy Markdown

ESP32-S3 boards that include esp32s3_usb_otg.dtsi in their overlay now get boards/common/esp32s3_usb.conf passed 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.

Copilot AI lite review requested due to automatic review settings August 26, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_FILE to boards/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.

Comment thread build.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants