aboutsummaryrefslogtreecommitdiffstats
path: root/dhrystone
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-11-03 18:59:12 +0100
committerClifford Wolf <clifford@clifford.at>2015-11-03 18:59:12 +0100
commit8d9f048785a4972fee5817cc64ddb2097034b122 (patch)
tree5a227d5ab158f7424683a02ee741d3cd36a4a1f9 /dhrystone
parent17a665913ef2bf740e8ba03af05f58a978d52e77 (diff)
downloadpicorv32-8d9f048785a4972fee5817cc64ddb2097034b122.tar.gz
picorv32-8d9f048785a4972fee5817cc64ddb2097034b122.zip
Using riscv32-unknown-elf- toolchain
Diffstat (limited to 'dhrystone')
-rw-r--r--dhrystone/Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/dhrystone/Makefile b/dhrystone/Makefile
index e799037..e42fa17 100644
--- a/dhrystone/Makefile
+++ b/dhrystone/Makefile
@@ -1,6 +1,7 @@
OBJS = start.o dhry_1.o dhry_2.o stdlib.o
CFLAGS = -MD -O3 -m32 -march=RV32I -ffreestanding -nostdlib -DTIME -DRISCV
+TOOLCHAIN_PREFIX = riscv32-unknown-elf-
test: testbench.exe dhry.hex
vvp -N testbench.exe
@@ -21,18 +22,20 @@ dhry.hex: dhry.bin ../firmware/makehex.py
python3 ../firmware/makehex.py $< 16384 > $@
dhry.bin: dhry.elf
- riscv64-unknown-elf-objcopy -O binary $< $@
+ $(TOOLCHAIN_PREFIX)objcopy -O binary $< $@
chmod -x $@
dhry.elf: $(OBJS) ../firmware/sections.lds
- riscv64-unknown-elf-gcc $(CFLAGS) -Wl,-Bstatic,-T,../firmware/sections.lds,-Map,dhry.map,--strip-debug -o $@ $(OBJS) -lgcc
+ $(TOOLCHAIN_PREFIX)gcc $(CFLAGS) -Wl,-Bstatic,-T,../firmware/sections.lds,-Map,dhry.map,--strip-debug -o $@ $(OBJS) -lgcc
chmod -x $@
%.o: %.c
- riscv64-unknown-elf-gcc -c $(CFLAGS) $<
+ $(TOOLCHAIN_PREFIX)gcc -c $(CFLAGS) $<
%.o: %.S
- riscv64-unknown-elf-gcc -c $(CFLAGS) $<
+ $(TOOLCHAIN_PREFIX)gcc -c $(CFLAGS) $<
+
+dhry_1.o dhry_2.o: CFLAGS += -Wno-implicit-int -Wno-implicit-function-declaration
clean:
rm -rf *.o *.d dhry.elf dhry.map dhry.bin dhry.hex testbench.exe testbench.vcd timing.exe timing.txt