Server: Frame.panel_type (new column + migration) is auto-derived from the device's reported board (X-Frame-Board), never user-set -- the panel is a property of the hardware, not a picker in the UI. image_pipeline's packing/render pipeline is parameterized by panel geometry instead of hardcoded 800x480 globals, with the real confirmed 13.3in geometry (1600x1200) registered alongside the original 7.3in panel. Existing 7.3in frames are unaffected (column default + board mapping both resolve to the original panel). Board identifiers are also renamed (devkit/xiao -> devkit_esp32c6/ xiao_esp32c6, plus new "ee02") since the EE02 board also carries a XIAO module -- "xiao" alone stopped disambiguating hardware. The server keeps accepting the legacy bare names indefinitely for already-flashed devices. Firmware: scaffolds a third build target (ee02, ESP32-S3 -- a real chip-target change, not just a same-chip Kconfig variant like xiao) and a new epd13in3e driver component skeleton. The actual panel init/LUT/ refresh register sequence isn't ported from vendor demo code yet (none was available), so that component deliberately fails to compile (#error) rather than risk sending unverified register values to real hardware -- devkit/xiao are unaffected and build identically to before. CI's ee02 build step is continue-on-error for the same reason.
82 lines
2.6 KiB
Bash
Executable File
82 lines
2.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builds (or flashes/monitors, if a serial port is actually attached)
|
|
# the espresso_frame firmware for one board variant, via the project's
|
|
# own firmware/build_for_board.sh -- this script just sources the
|
|
# ESP-IDF environment first and auto-runs `set-target` (esp32c6 for
|
|
# devkit/xiao, esp32s3 for ee02) on a board's very first build (a fresh
|
|
# clone has no generated sdkconfig yet, same reasoning as CI's own build
|
|
# steps -- see firmware/README.md's "Building for the Seeed XIAO
|
|
# ESP32-C6" section).
|
|
#
|
|
# NOTE: ee02 builds will fail to compile -- deliberately -- until
|
|
# firmware/components/epd13in3e's panel driver is ported from vendor
|
|
# demo code (see that component's own top-of-file comment). The build
|
|
# plumbing itself (target selection, partition table, sdkconfig
|
|
# layering) is exercised regardless; only the final compile step fails.
|
|
#
|
|
# Usage:
|
|
# build.sh # build devkit (default)
|
|
# build.sh devkit
|
|
# build.sh xiao
|
|
# build.sh ee02
|
|
# build.sh both # build devkit + xiao (unchanged meaning)
|
|
# build.sh all # build devkit + xiao + ee02
|
|
# build.sh xiao flash -p /dev/ttyUSB0 # only meaningful with real hardware attached
|
|
set -euo pipefail
|
|
|
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
firmware_dir="$(git -C "$script_dir" rev-parse --show-toplevel)/firmware"
|
|
|
|
IDF_DIR="$HOME/.espressif-idf/esp-idf"
|
|
if [ ! -f "$IDF_DIR/export.sh" ]; then
|
|
echo "ESP-IDF not found at $IDF_DIR -- run setup.sh first" >&2
|
|
exit 1
|
|
fi
|
|
# export.sh is chatty and assumes an interactive shell prompt in spots;
|
|
# redirect its own stdout, not ours, so build.sh's actual output (and a
|
|
# real failure's stderr) stays visible.
|
|
source "$IDF_DIR/export.sh" > /dev/null
|
|
|
|
cd "$firmware_dir"
|
|
|
|
build_one() {
|
|
local board="$1"
|
|
shift
|
|
local sdkconfig target
|
|
case "$board" in
|
|
devkit) sdkconfig="sdkconfig"; target="esp32c6" ;;
|
|
xiao) sdkconfig="sdkconfig.xiao_local"; target="esp32c6" ;;
|
|
ee02) sdkconfig="sdkconfig.ee02_local"; target="esp32s3" ;;
|
|
*) echo "Unknown board '$board' -- expected 'devkit', 'xiao', or 'ee02'" >&2; exit 1 ;;
|
|
esac
|
|
|
|
if [ ! -f "$sdkconfig" ]; then
|
|
echo "==> $board: no generated sdkconfig yet, setting target $target"
|
|
./build_for_board.sh "$board" set-target "$target"
|
|
fi
|
|
|
|
local args=("$@")
|
|
if [ ${#args[@]} -eq 0 ]; then
|
|
args=(build)
|
|
fi
|
|
./build_for_board.sh "$board" "${args[@]}"
|
|
}
|
|
|
|
board="${1:-devkit}"
|
|
shift || true
|
|
|
|
case "$board" in
|
|
both)
|
|
build_one devkit "$@"
|
|
build_one xiao "$@"
|
|
;;
|
|
all)
|
|
build_one devkit "$@"
|
|
build_one xiao "$@"
|
|
build_one ee02 "$@"
|
|
;;
|
|
*)
|
|
build_one "$board" "$@"
|
|
;;
|
|
esac
|