Working Diag & artnet proto with imported led driver smi lib C

This commit is contained in:
2025-06-23 17:28:04 +00:00
parent 86fbf1670c
commit 535822198b
49 changed files with 3014 additions and 99 deletions
Executable
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
VSCODE_WS="$(pwd)"
SSH_REMOTE="raspberrypi.local"
APP="lightsabre_backend"
TARGET_ARCH="armv7-unknown-linux-gnueabihf"
BUILD_BIN_FILE="${VSCODE_WS}/target/${TARGET_ARCH}/debug/${APP}"
TARGET_USER="pi"
TARGET_BIN_FILE="/tmp/${APP}"
TARGET_CWD="/tmp"
cargo build
ssh "${TARGET_USER}@${SSH_REMOTE}" "sudo killall lldb-server ${APP}"
if ! rsync -avz "${BUILD_BIN_FILE}" "${TARGET_USER}@${SSH_REMOTE}:${TARGET_BIN_FILE}"; then
# If rsync doesn't work, it may not be available on target. Fallback to trying SSH copy.
if ! scp "${BUILD_BIN_FILE}" "${TARGET_USER}@${SSH_REMOTE}:${TARGET_BIN_FILE}"; then
exit 2
fi
fi
if [[ "$1" == "--debug" ]]; then
echo "Running in debug mode"
ssh "${TARGET_USER}@${SSH_REMOTE}" "sh -c 'cd ${TARGET_CWD}; sudo RUST_LOG=debug lldb -o run ${TARGET_BIN_FILE}'"
else
echo "Running in release mode"
ssh "${TARGET_USER}@${SSH_REMOTE}" "sh -c 'cd ${TARGET_CWD}; sudo RUST_LOG=info ${TARGET_BIN_FILE}'"
fi