diff options
Diffstat (limited to 'assembly/timer-test/Makefile')
| -rw-r--r-- | assembly/timer-test/Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
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 + |
