diff options
Diffstat (limited to 'src/baremetal')
| -rwxr-xr-x | src/baremetal/run.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/baremetal/run.sh b/src/baremetal/run.sh index d6ac333..aec9d20 100755 --- a/src/baremetal/run.sh +++ b/src/baremetal/run.sh @@ -12,6 +12,10 @@ # Prints the program's UART output and nothing else. Exits 0 on a clean # power-off. A missing toolchain exits 0 from `ready` and 1 otherwise. set -euo pipefail +case "${1:-}" in + --help|-h) printf '%s\n' 'usage: src/baremetal/run.sh ready riscv|aarch64' ' src/baremetal/run.sh riscv|aarch64 run|io|compile FILE.zc' 'builds a freestanding microcore and boots it in qemu-system.' 'run compiles the program into the image; io also forwards program input.' 'compile sends source to the resident compiler over the uart.' 'ready checks for the cross compiler and emulator.'; exit 0 ;; + -*) echo "baremetal run: unknown option $1; use --help for usage" >&2; exit 2 ;; +esac cd "$(dirname "$0")/../.." ready() { |
