summaryrefslogtreecommitdiff
path: root/assembly/timer-test/Makefile
blob: 7989624df9a6d5a63d2c1aeae86e4b9f14eace3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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