Added serv and made a blinky testbench for it

This commit is contained in:
2026-02-21 19:24:18 +01:00
parent 3b04f3a6be
commit a261264fda
12 changed files with 284 additions and 2 deletions

14
sw/blinky/Makefile Normal file
View 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