From 33e4744d1c73c9f5512abb4010e4cc81763ab3a2 Mon Sep 17 00:00:00 2001 From: cheapie Date: Fri, 19 Jun 2026 22:38:28 -0500 Subject: Add machine timer interrupt --- assembly/timer-test/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 assembly/timer-test/Makefile (limited to 'assembly/timer-test/Makefile') diff --git a/assembly/timer-test/Makefile b/assembly/timer-test/Makefile new file mode 100644 index 0000000..7989624 --- /dev/null +++ b/assembly/timer-test/Makefile @@ -0,0 +1,24 @@ +MARCH ?= rv32imacbzicntr_zicond_zicsr_zifencei_zihintpause_zilsd_zclsd_zabha_zacas_zbkb_zbkx_zcb_zcmp_zcmt + +.PHONY: all dump load clean + +all: timer-test.hex + +timer-test.o: timer-test.S + riscv32-none-elf-as -I../rvcontroller-libraries -march=${MARCH} -o timer-test.o timer-test.S + +timer-test.elf: timer-test.o + riscv32-none-elf-ld -T rvcontroller.ld --no-warn-rwx-segments -o timer-test.elf timer-test.o + +dump: timer-test.elf + riscv32-none-elf-objdump -d timer-test.elf + +timer-test.hex: timer-test.elf + riscv32-none-elf-objcopy -O ihex timer-test.elf timer-test.hex + +load: timer-test.hex + bash -c "wl-copy < timer-test.hex" + +clean: + rm -f timer-test.hex timer-test.elf timer-test.o + -- cgit v1.2.3