kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

arm32_emit_temp_pressure.sh (618B)


      1 #!/usr/bin/env bash
      2 set -euo pipefail
      3 
      4 ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
      5 KIT="${KIT:-$ROOT/build/kit}"
      6 WORK="$ROOT/build/test/opt/arm32_emit_temp_pressure"
      7 SRC="$ROOT/test/opt/arm32_emit_temp_pressure.c"
      8 mkdir -p "$WORK"
      9 
     10 if ! "$KIT" cc -O1 -target arm-none-eabi -mcpu=cortex-m3 \
     11   -mfloat-abi=soft -ffreestanding -std=c11 -c "$SRC" \
     12   -o "$WORK/pressure.o" > "$WORK/compile.out" 2>&1; then
     13   sed 's/^/  | /' "$WORK/compile.out" >&2
     14   exit 1
     15 fi
     16 
     17 if [ ! -s "$WORK/pressure.o" ]; then
     18   printf 'arm32_emit_temp_pressure: compiler produced no object\n' >&2
     19   exit 1
     20 fi
     21 printf 'arm32_emit_temp_pressure: OK\n'