From 2cce6f4e8bb341b002352107215d8e93abda1988 Mon Sep 17 00:00:00 2001 From: Tommy Thorn Date: Wed, 3 Jun 2020 00:48:04 -0700 Subject: 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. --- picosoc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'picosoc') 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 -- cgit