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
+2 -2
View File
@@ -11,7 +11,7 @@ TARGET_USER="pi"
TARGET_BIN_FILE="/tmp/${APP}"
TARGET_CWD="/tmp"
ssh "${TARGET_USER}@${SSH_REMOTE}" "killall lldb-server ${APP}"
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.
@@ -20,4 +20,4 @@ if ! rsync -avz "${BUILD_BIN_FILE}" "${TARGET_USER}@${SSH_REMOTE}:${TARGET_BIN_F
fi
fi
ssh -f "${TARGET_USER}@${SSH_REMOTE}" "sh -c 'cd ${TARGET_CWD}; RUST_LOG=debug nohup lldb-server g *:${GDBPORT} ${TARGET_BIN_FILE} > /dev/null 2>&1 &'"
ssh -f "${TARGET_USER}@${SSH_REMOTE}" "sh -c 'cd ${TARGET_CWD}; sudo RUST_LOG=trace nohup lldb-server g *:${GDBPORT} ${TARGET_BIN_FILE} > /dev/null 2>&1 &'"
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