fix: Flash-Skript an EVK-Befund angepasst, Checkliste abgehakt
- Flash-Skript flasht jetzt das App-Image (ninlight_<dev>_gz.img) mit 460800 baud - -rs none statt -rs rts, Reset-Taste manuell nötig - Optionales Argument 'full' für Vollbild-Flash (blank chips nur) - Checkliste Light und Persistenz als bestanden markiert, Testdatum notiert
This commit is contained in:
+13
-5
@@ -1,13 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Flashes build/<device>/ninlight_<device>.fls over the serial port (runs natively on the Mac).
|
||||
# Usage: tools/flash.sh <device> <port-name as listed by `build/host-tools/wm_tool -l`>
|
||||
# Flashes app image (ninlight_<device>_gz.img) over the serial port (runs natively on the Mac).
|
||||
# For blank/erased chips only: pass "full" as third argument to flash ninlight_<device>.fls instead.
|
||||
# Usage: tools/flash.sh <device> <port-name as listed by `build/host-tools/wm_tool -l`> [full]
|
||||
set -euo pipefail
|
||||
DEV=${1:?usage: tools/flash.sh <device> <port>}
|
||||
PORT=${2:?usage: tools/flash.sh <device> <port>}
|
||||
DEV=${1:?usage: tools/flash.sh <device> <port> [full]}
|
||||
PORT=${2:?usage: tools/flash.sh <device> <port> [full]}
|
||||
MODE=${3:-app}
|
||||
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
||||
TOOL="$ROOT/build/host-tools/wm_tool"
|
||||
if [ ! -x "$TOOL" ] || [ "$ROOT/sdk/tools/wm_tool.c" -nt "$TOOL" ]; then
|
||||
mkdir -p "$(dirname "$TOOL")"
|
||||
cc -O2 -w -o "$TOOL" "$ROOT/sdk/tools/wm_tool.c" -lpthread
|
||||
fi
|
||||
"$TOOL" -c "$PORT" -ds 921600 -rs rts -dl "$ROOT/build/$DEV/ninlight_$DEV.fls"
|
||||
if [ "$MODE" = "full" ]; then
|
||||
echo "Bitte bei \"please manually reset the device\" die Reset-Taste drücken."
|
||||
"$TOOL" -c "$PORT" -ds 460800 -rs none -eo secboot -dl "$ROOT/build/$DEV/ninlight_$DEV.fls"
|
||||
else
|
||||
echo "Bitte bei \"please manually reset the device\" die Reset-Taste drücken."
|
||||
"$TOOL" -c "$PORT" -ds 460800 -rs none -dl "$ROOT/build/$DEV/ninlight_${DEV}_gz.img"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user