diff options
Diffstat (limited to 'assembly/trap-test/Makefile')
| -rw-r--r-- | assembly/trap-test/Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/assembly/trap-test/Makefile b/assembly/trap-test/Makefile new file mode 100644 index 0000000..8833502 --- /dev/null +++ b/assembly/trap-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: trap-test.hex + +trap-test.o: trap-test.S + riscv32-none-elf-as -I../rvcontroller-libraries -march=${MARCH} -o trap-test.o trap-test.S + +trap-test.elf: trap-test.o + riscv32-none-elf-ld -T rvcontroller.ld --no-warn-rwx-segments -o trap-test.elf trap-test.o + +dump: trap-test.elf + riscv32-none-elf-objdump -d trap-test.elf + +trap-test.hex: trap-test.elf + riscv32-none-elf-objcopy -O ihex trap-test.elf trap-test.hex + +load: trap-test.hex + bash -c "wl-copy < trap-test.hex" + +clean: + rm -f trap-test.hex trap-test.elf trap-test.o + |
