# sw/Makefile -- ame_bare.bin for tpu_mcore: any RV32 GCC (make CROSS=riscv32-unknown-elf-), linked at 0x8000_0000 where the hart starts
CROSS ?= riscv32-unknown-elf-
ame_bare.bin: ame_bare.c ame.h link.ld
	$(CROSS)gcc -O2 -march=rv32ima_zicsr -mabi=ilp32 -ffreestanding -fno-builtin -nostdlib -nostartfiles -static -T link.ld -o ame_bare.elf ame_bare.c
	$(CROSS)objcopy -O binary ame_bare.elf $@
clean:
	rm -f ame_bare.elf ame_bare.bin
.PHONY: clean
