mirror of https://github.com/YosysHQ/picorv32.git
Some build fixes for new riscv-gnu-toolchain
This commit is contained in:
parent
56dc5b3549
commit
55da6c7cd1
8
Makefile
8
Makefile
|
@ -63,19 +63,19 @@ firmware/firmware.bin: firmware/firmware.elf
|
||||||
chmod -x $@
|
chmod -x $@
|
||||||
|
|
||||||
firmware/firmware.elf: $(FIRMWARE_OBJS) $(TEST_OBJS) firmware/sections.lds
|
firmware/firmware.elf: $(FIRMWARE_OBJS) $(TEST_OBJS) firmware/sections.lds
|
||||||
$(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o $@ \
|
$(TOOLCHAIN_PREFIX)gcc -Os -ffreestanding -nostdlib -o $@ \
|
||||||
-Wl,-Bstatic,-T,firmware/sections.lds,-Map,firmware/firmware.map,--strip-debug \
|
-Wl,-Bstatic,-T,firmware/sections.lds,-Map,firmware/firmware.map,--strip-debug \
|
||||||
$(FIRMWARE_OBJS) $(TEST_OBJS) -lgcc
|
$(FIRMWARE_OBJS) $(TEST_OBJS) -lgcc
|
||||||
chmod -x $@
|
chmod -x $@
|
||||||
|
|
||||||
firmware/start.o: firmware/start.S
|
firmware/start.o: firmware/start.S
|
||||||
$(TOOLCHAIN_PREFIX)gcc -c -m32 -march=RV32IM$(COMPRESSED_ISA) -o $@ $<
|
$(TOOLCHAIN_PREFIX)gcc -c -march=rv32im$(subst C,c,$(COMPRESSED_ISA)) -o $@ $<
|
||||||
|
|
||||||
firmware/%.o: firmware/%.c
|
firmware/%.o: firmware/%.c
|
||||||
$(TOOLCHAIN_PREFIX)gcc -c -m32 -march=RV32I$(COMPRESSED_ISA) -Os --std=c99 $(GCC_WARNS) -ffreestanding -nostdlib -o $@ $<
|
$(TOOLCHAIN_PREFIX)gcc -c -march=rv32i$(subst C,c,$(COMPRESSED_ISA)) -Os --std=c99 $(GCC_WARNS) -ffreestanding -nostdlib -o $@ $<
|
||||||
|
|
||||||
tests/%.o: tests/%.S tests/riscv_test.h tests/test_macros.h
|
tests/%.o: tests/%.S tests/riscv_test.h tests/test_macros.h
|
||||||
$(TOOLCHAIN_PREFIX)gcc -c -m32 -march=RV32IM -o $@ -DTEST_FUNC_NAME=$(notdir $(basename $<)) \
|
$(TOOLCHAIN_PREFIX)gcc -c -march=rv32im -o $@ -DTEST_FUNC_NAME=$(notdir $(basename $<)) \
|
||||||
-DTEST_FUNC_TXT='"$(notdir $(basename $<))"' -DTEST_FUNC_RET=$(notdir $(basename $<))_ret $<
|
-DTEST_FUNC_TXT='"$(notdir $(basename $<))"' -DTEST_FUNC_RET=$(notdir $(basename $<))_ret $<
|
||||||
|
|
||||||
download-tools:
|
download-tools:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
USE_MYSTDLIB = 0
|
USE_MYSTDLIB = 0
|
||||||
OBJS = dhry_1.o dhry_2.o stdlib.o
|
OBJS = dhry_1.o dhry_2.o stdlib.o
|
||||||
CFLAGS = -MD -O3 -m32 -march=RV32IM -DTIME -DRISCV
|
CFLAGS = -MD -O3 -march=rv32im -DTIME -DRISCV
|
||||||
TOOLCHAIN_PREFIX = /opt/riscv32im/bin/riscv32-unknown-elf-
|
TOOLCHAIN_PREFIX = /opt/riscv32im/bin/riscv32-unknown-elf-
|
||||||
|
|
||||||
ifeq ($(USE_MYSTDLIB),1)
|
ifeq ($(USE_MYSTDLIB),1)
|
||||||
|
|
Loading…
Reference in New Issue