2023-03-22 11:37:13 +00:00
|
|
|
SRCS = $(wildcard *.S)
|
|
|
|
PROGS = $(patsubst %.S,%,$(SRCS))
|
2023-03-21 13:57:03 +00:00
|
|
|
|
2023-03-22 11:37:13 +00:00
|
|
|
all: $(PROGS)
|
2023-03-21 13:57:03 +00:00
|
|
|
|
2023-03-22 11:37:13 +00:00
|
|
|
%: %.S WALLY-init-lib.h Makefile
|
|
|
|
echo $@
|
|
|
|
riscv64-unknown-elf-gcc -g -o $@.elf -march=rv64gc -mabi=lp64 -mcmodel=medany \
|
|
|
|
-nostartfiles -T../../examples/link/link.ld $@.S
|
|
|
|
riscv64-unknown-elf-objdump -D $@.elf > $@.objdump
|
|
|
|
|
|
|
|
sim: %.elf
|
|
|
|
spike +signature=%.signature.output +signature-granularity=8 %.elf
|
|
|
|
diff --ignore-case %.signature.output %.reference_output || exit
|
2023-03-21 13:57:03 +00:00
|
|
|
echo "Signature matches! Success!"
|
|
|
|
|
|
|
|
clean:
|
2023-03-22 11:37:13 +00:00
|
|
|
rm -f *.elf *.objdump *.signature.output
|
2023-03-21 13:57:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|