- scripts/flash-useq-main.sh + scripts/flash-useq-expander.sh: build + flash each uSEQ board via PlatformIO (nix-shell fallback for pio; extra args pass through; BOOTSEL hint). - CV backend: green status now means a CONFIRMED handshake, not just an open port. Any valid device->host frame (the firmware streams INPUT at 20 Hz, or an identify ack) flips it ready/green; a 2.5s watchdog after open surfaces a red 'no response from module' if nothing replies. idle/grey when nothing connected. - Outputs panel CV config: explicit handshake indicator (coloured dot + label — green 'Module handshake OK' / amber waiting / red error / grey not connected). - Docs: firmware README + MAP.md note the scripts.
36 lines
1.3 KiB
Bash
Executable file
36 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Build + flash the uSEQ-CV **main** module firmware (firmware/useq-celium/main).
|
|
# Target: uSEQ USEQHARDWARE_1_0 (RP2040). Any extra args are passed to pio
|
|
# (e.g. --upload-port /dev/ttyACM0).
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
BOARD_DIR="$SCRIPT_DIR/../firmware/useq-celium/main"
|
|
ENV="main"
|
|
|
|
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
echo "Usage: scripts/flash-useq-main.sh [extra pio args]"
|
|
echo " Builds firmware/useq-celium/main and uploads it to the uSEQ MAIN board."
|
|
exit 0
|
|
fi
|
|
|
|
# Resolve PlatformIO (nix-friendly: fall back to an ephemeral nix-shell).
|
|
run_pio() {
|
|
if command -v pio >/dev/null 2>&1; then
|
|
pio "$@"
|
|
elif command -v platformio >/dev/null 2>&1; then
|
|
platformio "$@"
|
|
elif command -v nix-shell >/dev/null 2>&1; then
|
|
nix-shell -p platformio --run "pio $*"
|
|
else
|
|
echo "error: PlatformIO not found. Install it, e.g.:" >&2
|
|
echo " nix-shell -p platformio # or: pipx install platformio" >&2
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
echo "==> Build + flash uSEQ MAIN module (env: $ENV)"
|
|
echo " If the upload can't auto-reset the board, hold BOOTSEL while plugging in USB."
|
|
cd "$BOARD_DIR"
|
|
run_pio run -e "$ENV" -t upload "$@"
|
|
echo "==> Done. The main board's LEDs sweep on Identify from the Manifold CV panel."
|