aboutsummaryrefslogtreecommitdiffstats
path: root/picosoc
diff options
context:
space:
mode:
authorTommy Thorn <tommy-github2@thorn.ws>2020-06-03 00:48:04 -0700
committerTommy Thorn <tommy-github2@thorn.ws>2020-06-03 09:27:30 -0700
commit2cce6f4e8bb341b002352107215d8e93abda1988 (patch)
tree7b145ca0f25781d449c4462ea6ce5e3ccd9bea92 /picosoc
parentf9b1beb4cfd6b382157b54bc8f38c61d5ae7d785 (diff)
downloadpicorv32-2cce6f4e8bb341b002352107215d8e93abda1988.tar.gz
picorv32-2cce6f4e8bb341b002352107215d8e93abda1988.zip
Enable the use of 64-bit riscv tools
Many Linux distributions now include the tools for RISC-V (for example Ubuntu 20.04 has gcc-riscv64-unknown-elf) but in order for make TOOLCHAIN_PREFIX=riscv64-unknown-elf- to work we need to be explicit about compiling for 32-bit.
Diffstat (limited to 'picosoc')
-rw-r--r--picosoc/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/picosoc/Makefile b/picosoc/Makefile
index f600062..17ad1db 100644
--- a/picosoc/Makefile
+++ b/picosoc/Makefile
@@ -40,7 +40,7 @@ hx8kdemo_sections.lds: sections.lds
$(CROSS)cpp -P -DHX8KDEMO -o $@ $^
hx8kdemo_fw.elf: hx8kdemo_sections.lds start.s firmware.c
- $(CROSS)gcc $(CFLAGS) -DHX8KDEMO -march=rv32imc -Wl,-Bstatic,-T,hx8kdemo_sections.lds,--strip-debug -ffreestanding -nostdlib -o hx8kdemo_fw.elf start.s firmware.c
+ $(CROSS)gcc $(CFLAGS) -DHX8KDEMO -mabi=ilp32 -march=rv32imc -Wl,--build-id=none,-Bstatic,-T,hx8kdemo_sections.lds,--strip-debug -ffreestanding -nostdlib -o hx8kdemo_fw.elf start.s firmware.c
hx8kdemo_fw.hex: hx8kdemo_fw.elf
$(CROSS)objcopy -O verilog hx8kdemo_fw.elf hx8kdemo_fw.hex
@@ -86,7 +86,7 @@ icebreaker_sections.lds: sections.lds
$(CROSS)cpp -P -DICEBREAKER -o $@ $^
icebreaker_fw.elf: icebreaker_sections.lds start.s firmware.c
- $(CROSS)gcc $(CFLAGS) -DICEBREAKER -march=rv32ic -Wl,-Bstatic,-T,icebreaker_sections.lds,--strip-debug -ffreestanding -nostdlib -o icebreaker_fw.elf start.s firmware.c
+ $(CROSS)gcc $(CFLAGS) -DICEBREAKER -mabi=ilp32 -march=rv32ic -Wl,-Bstatic,-T,icebreaker_sections.lds,--strip-debug -ffreestanding -nostdlib -o icebreaker_fw.elf start.s firmware.c
icebreaker_fw.hex: icebreaker_fw.elf
$(CROSS)objcopy -O verilog icebreaker_fw.elf icebreaker_fw.hex