2025-08-20 20:54:21 -05:00

6 lines
252 B
Bash

set -eux
sh4-none-elf-as --isa=sh4 --little start.s -o start.o
sh4-none-elf-gcc -std=gnu23 -O1 -m4 -ml -ffreestanding -nostdlib -c "${1}.c"
sh4-none-elf-ld -T main.lds -o "${1}.elf" start.o "${1}.o"
sh4-none-elf-objcopy -O binary "${1}.elf" "${1}.bin"