cvw/tests/coverage/Makefile

22 lines
542 B
Makefile
Raw Normal View History

SRCS = $(wildcard *.S)
PROGS = $(patsubst %.S,%,$(SRCS))
2023-03-21 13:57:03 +00:00
all: $(PROGS)
2023-03-21 13:57:03 +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:
rm -f *.elf *.objdump *.signature.output
2023-03-21 13:57:03 +00:00