summaryrefslogtreecommitdiff
path: root/assembly/hello/Makefile
blob: d7649e5e0843de2002e0aa267a6c73b320f9d60c (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: hello.hex

hello.o: hello.S
	riscv32-none-elf-as -I../rvcontroller-libraries -march=${MARCH} -o hello.o hello.S

hello.elf:  hello.o
	riscv32-none-elf-ld -T rvcontroller.ld --no-warn-rwx-segments -o hello.elf hello.o

dump: hello.elf
	riscv32-none-elf-objdump -d hello.elf

hello.hex: hello.elf
	riscv32-none-elf-objcopy -O ihex hello.elf hello.hex

load: hello.hex
	bash -c "wl-copy < hello.hex"

clean:
	rm -f hello.bin hello.elf hello.o