mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-01 21:38:20 +00:00
build: enable USB CDC companion transport for ESP32-S3 boards (#77)
* build: enable USB CDC companion transport for ESP32-S3 boards * build: detect USB CDC companion support from board overlay Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
27ea7e41a5
commit
7b8b66cb4c
@@ -272,8 +272,27 @@ if [[ $1 == "esp32" ]]; then
|
||||
|
||||
if [[ $2 == "companions" ]]; then
|
||||
# build ESP32 companions (production is the default)
|
||||
#
|
||||
# ESP32-S3 boards that include esp32s3_usb_otg.dtsi in their overlay
|
||||
# get the USB CDC-ACM companion transport enabled via esp32s3_usb.conf.
|
||||
# This gives the full companion protocol over native USB (Web Serial /
|
||||
# app.meshcore.io) in addition to BLE. Boards without the OTG DTSI
|
||||
# (Heltec V3/CP2102, Wireless Tracker V1, C3/C6, classic ESP32) are
|
||||
# unaffected — they use BLE or serial_companion instead.
|
||||
usb_conf=""
|
||||
board_stem="${board%%/*}"
|
||||
overlay="zephcore/boards/esp32/${board_stem}/board.overlay"
|
||||
if [[ $board =~ esp32s3 && -f "$overlay" ]] && grep -q 'esp32s3_usb_otg\.dtsi' "$overlay"; then
|
||||
usb_conf="boards/common/esp32s3_usb.conf"
|
||||
fi
|
||||
|
||||
echo "Now building $board companion"
|
||||
west build -b "$board" zephcore --pristine --sysbuild
|
||||
if [[ -n "$usb_conf" ]]; then
|
||||
echo " USB CDC companion: enabled ($usb_conf)"
|
||||
west build -b "$board" zephcore --pristine --sysbuild -- -DEXTRA_CONF_FILE="$usb_conf"
|
||||
else
|
||||
west build -b "$board" zephcore --pristine --sysbuild
|
||||
fi
|
||||
FLASH_SIZE=$(
|
||||
python3 -c '
|
||||
import re
|
||||
|
||||
Reference in New Issue
Block a user