flowrs-engine/crates/flowrs-live/fixtures/rtt-demo/build.sh
flowRS fd958c0547 flowRS engine, cut from flowRS 3451b065
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 19:04:39 -05:00

13 lines
712 B
Shell
Executable file

#!/usr/bin/env bash
# Builds rtt_demo.elf (committed beside this directory) from src/main.rs.
# Needs the thumbv6m-none-eabi target: rustup target add thumbv6m-none-eabi
set -euo pipefail
HERE=$(cd "$(dirname "$0")" && pwd)
cd "$HERE"
# The ELF is committed, and its debug info names the paths it was built from: no machine's
# paths go in it.
export CARGO_ENCODED_RUSTFLAGS="$(printf -- '--remap-path-prefix=%s=/build/toolroot\037--remap-path-prefix=%s=/build/flowrs\037-Clink-arg=-Tlink.x\037-Clink-arg=-Tdefmt.x' "$HOME" "$HERE")"
cargo build --release $( [ -f Cargo.lock ] && echo --locked )
OUT=${CARGO_TARGET_DIR:-target}/thumbv6m-none-eabi/release/rtt-demo
cp "$OUT" ../rtt_demo.elf
ls -l ../rtt_demo.elf