mirror of
https://github.com/skoelle/m5stack-dashboard.git
synced 2026-09-17 16:50:23 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Build + flash the M5Stack Dashboard project via PlatformIO.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/deploy.sh # auto-detect USB port
|
||||
# ./scripts/deploy.sh /dev/ttyUSB0 # force a specific port
|
||||
#
|
||||
# This script intentionally does NOT open the serial monitor afterwards.
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
if ! command -v pio &> /dev/null; then
|
||||
echo "Error: PlatformIO CLI ('pio') not found in PATH."
|
||||
echo "Install it via: pip install -U platformio"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -ge 1 ]; then
|
||||
PORT="$1"
|
||||
echo "Using forced upload port: $PORT"
|
||||
pio run --target upload --upload-port "$PORT"
|
||||
else
|
||||
echo "Auto-detecting upload port..."
|
||||
pio run --target upload
|
||||
fi
|
||||
|
||||
echo "Build + flash complete."
|
||||
Reference in New Issue
Block a user