Recently Written · git

forthlisp-stm32

STM32F446 target for forthlisp: Thumb-2 Forth kernel built by an SBCL assembler, QEMU netduinoplus2

git clone https://github.com/equwal/forthlisp-stm32

Log | Files | Refs


stm32-forth (876 bytes)

1 #!/bin/sh
2 # stm32-forth -- boot the Forth kernel for the STM32F446 in QEMU (netduinoplus2) and give its prompt.
3 # Usage: stm32-forth                 interactive prompt on this terminal; ctrl-c quits
4 #        PORT=4444 stm32-forth       serve the console on 127.0.0.1:PORT instead
5 #        printf '1 2 + .\n' | stm32-forth    scripted (add a timeout yourself)
6 # QEMU (default qemu-system-arm) and SBCL (default sbcl) come from PATH unless set.
7 HERE=$(cd "$(dirname "$0")" && pwd)
8 IMG=$HERE/kernel-f446.bin
9 [ -f "$IMG" ] || "$HERE/build-firmware.sh" >/dev/null
10 if [ -n "$PORT" ]; then
11   exec "${QEMU:-qemu-system-arm}" -M netduinoplus2 -kernel "$IMG" -display none -monitor none \
12     -serial null -serial tcp:127.0.0.1:$PORT,server,nowait
13 fi
14 exec "${QEMU:-qemu-system-arm}" -M netduinoplus2 -kernel "$IMG" -display none -monitor none \
15   -serial null -serial stdio 2>/dev/null