feat(docs): update README and AGENTS.md with RTK instructions
This commit is contained in:
36
mise.toml
36
mise.toml
@@ -27,14 +27,16 @@ arduino-cli compile --fqbn "$FQBN" --libraries ./libraries $LIBS --build-propert
|
||||
|
||||
[tasks.upload]
|
||||
description = "Upload (uses BOARD env var)"
|
||||
depends = ["compile"]
|
||||
run = "source ./boards/$BOARD/board-config.sh && arduino-cli upload --fqbn $FQBN --port $PORT ./boards/$BOARD"
|
||||
|
||||
[tasks.monitor-raw]
|
||||
depends = ["compile", "kill"]
|
||||
run = """
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
arduino-cli upload --fqbn $FQBN --port $PORT ./boards/$BOARD
|
||||
"""
|
||||
|
||||
[tasks.monitor-raw]
|
||||
depends = ["kill"]
|
||||
run = """
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
source ./scripts/lockfile.sh
|
||||
acquire_lock || exit 1
|
||||
|
||||
PORT="${PORT:-$PORT}"
|
||||
TARGET="$(readlink -f "$PORT" 2>/dev/null || echo "$PORT")"
|
||||
@@ -43,10 +45,9 @@ arduino-cli monitor -p "$TARGET" --config baudrate=115200
|
||||
|
||||
[tasks.monitor-tio]
|
||||
description = "Show tio command to run in separate terminal"
|
||||
depends = ["kill"]
|
||||
run = """
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
source ./scripts/lockfile.sh
|
||||
acquire_lock || exit 1
|
||||
|
||||
PORT="${PORT:-$PORT}"
|
||||
TARGET="$(readlink -f "$PORT" 2>/dev/null || echo "$PORT")"
|
||||
@@ -54,20 +55,25 @@ tio --map INLCRNL "$TARGET" -e
|
||||
"""
|
||||
|
||||
[tasks.kill]
|
||||
description = "Kill running monitor/upload for BOARD"
|
||||
description = "Kill any process using the serial port for BOARD"
|
||||
run = '''
|
||||
set +e
|
||||
# Kill any processes using the serial port
|
||||
|
||||
# Load board config
|
||||
source ./boards/$BOARD/board-config.sh
|
||||
PORT="${PORT:-$PORT}"
|
||||
|
||||
# Kill any processes using the serial port
|
||||
echo "Killing processes on $PORT..."
|
||||
fuser -k "$PORT" 2>/dev/null || true
|
||||
|
||||
# Kill monitor-agent processes for this board
|
||||
for pid in $(pgrep -f "monitor-agent.py" 2>/dev/null || true); do
|
||||
# Kill monitor-agent Python processes for this board
|
||||
for pid in $(pgrep -f "monitor-agent.py.*$BOARD" 2>/dev/null || true); do
|
||||
echo "Killing monitor-agent.py (PID: $pid)..."
|
||||
kill "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
# Also clean up lockfile
|
||||
# Clean up any stale lockfiles (legacy)
|
||||
rm -f "/tmp/doorbell-${BOARD}.lock" 2>/dev/null || true
|
||||
|
||||
sleep 1
|
||||
@@ -77,6 +83,7 @@ exit 0
|
||||
|
||||
[tasks.monitor]
|
||||
description = "Monitor agent with JSON log + command pipe (Python-based)"
|
||||
depends = ["kill"]
|
||||
run = """
|
||||
python3 ./scripts/monitor-agent.py "$BOARD"
|
||||
"""
|
||||
@@ -203,5 +210,8 @@ EOF
|
||||
echo "[OK] Generated .crush.json with FQBN: $FQBN"
|
||||
"""
|
||||
|
||||
[tasks.snap]
|
||||
run = "git add .; lumen draft | git commit -F - "
|
||||
|
||||
[env]
|
||||
BOARD = "esp32-s3-lcd-43"
|
||||
|
||||
Reference in New Issue
Block a user