Files
esphome-configs/hosted/xiao-c6-spi/build.sh
T
randy 177bdcb3de
CI / YAML lint (push) Successful in 6s
CI / ESPHome config validation (push) Successful in 1m15s
hosted/xiao-c6-spi: esp-hosted co-processor firmware for the mcu-its-g5 XIAO ESP32-C6
2026-11-16 22:07:33 +01:00

13 lines
559 B
Bash
Executable File

#!/bin/sh
# Build the co-processor firmware with the ESP-IDF that ESPHome already downloaded, and flash it
# when a port is given: ./build.sh [/dev/serial/by-id/usb-Espressif_...]
set -e
cd "$(dirname "$0")"
IDF=$(ls -d "$HOME"/.cache/esphome/idf/frameworks/5.5.* | sort -V | tail -1)
export IDF_PATH="$IDF" IDF_TOOLS_PATH="$HOME/.cache/esphome/idf"
export IDF_PYTHON_ENV_PATH="$HOME/.cache/esphome/idf/penvs/$(basename "$IDF")"
. "$IDF_PATH/export.sh" >/dev/null
[ -f sdkconfig ] || idf.py set-target esp32c6
idf.py build
[ -z "$1" ] || idf.py -p "$1" flash