Added serv and made a blinky testbench for it
This commit is contained in:
14
sw/blinky/Makefile
Normal file
14
sw/blinky/Makefile
Normal file
@@ -0,0 +1,14 @@
|
||||
TOOLCHAIN_PREFIX?=riscv64-elf-
|
||||
CC=$(TOOLCHAIN_PREFIX)gcc
|
||||
OBJCOPY=$(TOOLCHAIN_PREFIX)objcopy
|
||||
|
||||
%.elf: %.S link.ld
|
||||
# $(CC) -nostartfiles -nostdlib -march=rv32i_zicsr -mabi=ilp32 -Tlink.ld -o$@ $<
|
||||
$(CC) -nostartfiles -nostdlib -ffreestanding -march=rv32i_zicsr -mabi=ilp32 -Tlink.ld -o$@ $<
|
||||
%.bin: %.elf
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
%.hex: %.bin
|
||||
hexdump -v -e '1/1 "%02x\n"' $< > $@
|
||||
|
||||
clean:
|
||||
rm -f *.elf *.bin *.hex
|
||||
Reference in New Issue
Block a user