add tests for PWM

This commit is contained in:
Howard Mao
2016-10-26 11:56:59 -07:00
parent 905c9a14f6
commit 310db2c579
8 changed files with 2274 additions and 0 deletions

17
tests/Makefile Normal file
View File

@@ -0,0 +1,17 @@
GCC=riscv64-unknown-elf-gcc
CFLAGS=-mcmodel=medany -std=gnu99 -O2 -fno-common -fno-builtin-printf
LDFLAGS=-static -nostdlib -nostartfiles -lgcc
default: pwm.riscv
%.o: %.S
$(GCC) $(CFLAGS) -D__ASSEMBLY__=1 -c $< -o $@
%.o: %.c
$(GCC) $(CFLAGS) -c $< -o $@
%.riscv: %.o crt.o syscalls.o
$(GCC) -T link.ld $(LDFLAGS) $^ -o $@
clean:
rm -f *.riscv *.o