demo.sh (728 bytes)
1 #!/bin/sh 2 # Scripted proof of the layers: the host compiles Lisp to Forth words, loads the Scheme 3 # through the Forth console, and checks its answers. Every serial exchange has a timeout. 4 HERE=$(cd "$(dirname "$0")" && pwd) 5 CORE=${FORTHLISP_CORE:-$HERE}; [ -f "$CORE/host.lisp" ] || CORE=$HERE/../forthlisp # core repo checkout 6 IMG=$HERE/kernel-f446.bin 7 PORT=${PORT:-4445} 8 [ -f "$IMG" ] || "$HERE/build-firmware.sh" >/dev/null 9 "${QEMU:-qemu-system-arm}" -M netduinoplus2 -kernel "$IMG" -display none -monitor none \ 10 -serial null -serial tcp:127.0.0.1:$PORT,server,nowait 2>/dev/null & 11 QPID=$! 12 trap 'kill $QPID 2>/dev/null' EXIT HUP INT TERM 13 PORT=$PORT ${TIMEOUT:-timeout} 300 "${SBCL:-sbcl}" --script "$CORE/host.lisp" demo