2021-12-25 14:35:36 +00:00
|
|
|
TARGET = sumtest
|
|
|
|
|
|
|
|
$(TARGET).objdump: $(TARGET)
|
|
|
|
riscv64-unknown-elf-objdump -D $(TARGET) > $(TARGET).objdump
|
|
|
|
|
2022-01-25 06:53:03 +00:00
|
|
|
$(TARGET): $(TARGET).S sum.S Makefile
|
2021-12-25 14:35:36 +00:00
|
|
|
riscv64-unknown-elf-gcc -g -o $(TARGET) -march=rv64gc -mabi=lp64 -mcmodel=medany \
|
2022-01-24 23:21:09 +00:00
|
|
|
-nostartfiles -T../../link/link.ld $(TARGET).S sum.S
|
2021-12-25 14:35:36 +00:00
|
|
|
|
|
|
|
sim:
|
|
|
|
spike +signature=$(TARGET).signature.output +signature-granularity=8 $(TARGET)
|
|
|
|
diff --ignore-case $(TARGET).signature.output $(TARGET).reference_output || exit
|
|
|
|
echo "Signature matches! Success!"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET) $(TARGET).objdump $(TARGET).signature.output
|
2022-01-24 23:21:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|