build: W600-SDK importiert, Firmware-Build und Hello am EVK

Docker-Build mit gcc-arm-none-eabi 4.9-2014q4 (statt Homebrew-Cask) verwendet,
Dockerfile/tools/docker.sh dafür aus Task 13 vorgezogen. cmake/sdk.cmake schont
gcc 4.9 (kennt -fcommon/-Wno-error=... nicht). Zwei zusätzliche SDK-Stubs
(EarlyInit, pre_gpio_config) in src/sys/sdk_stubs.c ergänzt, siehe sdk/PATCHES.md.
This commit is contained in:
Michael Sauer
2026-09-11 12:52:26 +02:00
parent 4e7ff78fc6
commit 1b0501179d
610 changed files with 224089 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Runs a command inside the ninlight build container (x86_64, gcc-arm-none-eabi 4.9-2014q4).
# Usage: tools/docker.sh cmake --build build/evk
set -euo pipefail
ROOT=$(cd "$(dirname "$0")/.." && pwd)
docker image inspect ninlight-build >/dev/null 2>&1 || docker build --platform linux/amd64 -t ninlight-build "$ROOT/docker"
exec docker run --rm --platform linux/amd64 -v "$ROOT":/work -w /work ninlight-build "$@"
Executable
+13
View File
@@ -0,0 +1,13 @@
#!/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`>
set -euo pipefail
DEV=${1:?usage: tools/flash.sh <device> <port>}
PORT=${2:?usage: tools/flash.sh <device> <port>}
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"
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Serial console (115200 8N1, local echo). Usage: tools/monitor.sh /dev/cu.usbserial-XXXX
set -euo pipefail
PORT=${1:?usage: tools/monitor.sh <port>}
exec uv run --with pyserial python -m serial.tools.miniterm --echo --eol CR "$PORT" 115200