From 2260d2ab8a04dfa1a8b2d60d052770ea50f2472f Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Wed, 14 Feb 2018 16:46:10 -0600 Subject: [PATCH 1/2] scripts: remove old -m32 argument to riscv-gcc See also 55da6c7cd1f5ad798bfa0f52989434486c03b31b Signed-off-by: Austin Seipp --- scripts/icestorm/Makefile | 2 +- scripts/quartus/Makefile | 2 +- scripts/vivado/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/icestorm/Makefile b/scripts/icestorm/Makefile index 2740da0..cd3b018 100644 --- a/scripts/icestorm/Makefile +++ b/scripts/icestorm/Makefile @@ -4,7 +4,7 @@ TOOLCHAIN_PREFIX = riscv32-unknown-elf- all: example.bin firmware.elf: firmware.S firmware.c firmware.lds - $(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \ + $(TOOLCHAIN_PREFIX)gcc -Os -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \ --std=gnu99 -Wl,-Bstatic,-T,firmware.lds,-Map,firmware.map,--strip-debug -lgcc chmod -x firmware.elf diff --git a/scripts/quartus/Makefile b/scripts/quartus/Makefile index 8b994e0..c644609 100644 --- a/scripts/quartus/Makefile +++ b/scripts/quartus/Makefile @@ -37,7 +37,7 @@ sim_system: firmware.hex system_tb.v system.v ../../picorv32.v ./system_tb firmware.hex: firmware.S firmware.c firmware.lds - $(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \ + $(TOOLCHAIN_PREFIX)gcc -Os -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \ --std=gnu99 -Wl,-Bstatic,-T,firmware.lds,-Map,firmware.map,--strip-debug -lgcc $(TOOLCHAIN_PREFIX)objcopy -O binary firmware.elf firmware.bin python3 ../../firmware/makehex.py firmware.bin 4096 > firmware.hex diff --git a/scripts/vivado/Makefile b/scripts/vivado/Makefile index b1a89b9..d825e16 100644 --- a/scripts/vivado/Makefile +++ b/scripts/vivado/Makefile @@ -41,7 +41,7 @@ sim_system: $(XELAB) -L unifast_ver -L unisims_ver -R system_tb glbl firmware.hex: firmware.S firmware.c firmware.lds - $(TOOLCHAIN_PREFIX)gcc -Os -m32 -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \ + $(TOOLCHAIN_PREFIX)gcc -Os -ffreestanding -nostdlib -o firmware.elf firmware.S firmware.c \ --std=gnu99 -Wl,-Bstatic,-T,firmware.lds,-Map,firmware.map,--strip-debug -lgcc $(TOOLCHAIN_PREFIX)objcopy -O binary firmware.elf firmware.bin python3 ../../firmware/makehex.py firmware.bin 4096 > firmware.hex From 77a6b2dd26ac1a1638264434f019aedd385d3a39 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Wed, 14 Feb 2018 16:45:10 -0600 Subject: [PATCH 2/2] scripts/icestorm: use 'yosys-config' to find data directory This fixes the icestorm script to query yosys-config itself for the right data directory. Not only does this fix installs where yosys was not installed into /usr/local, it also ensures Icarus picks up a data directory consistent with the version of yosys that you're using. Signed-off-by: Austin Seipp --- scripts/icestorm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/icestorm/Makefile b/scripts/icestorm/Makefile index cd3b018..b86995f 100644 --- a/scripts/icestorm/Makefile +++ b/scripts/icestorm/Makefile @@ -35,7 +35,7 @@ example_sim_vcd: example_tb.vvp vvp -N example_tb.vvp +vcd synth_tb.vvp: example_tb.v synth.blif - iverilog -o synth_tb.vvp -s testbench synth.v example_tb.v /usr/local/share/yosys/ice40/cells_sim.v + iverilog -o synth_tb.vvp -s testbench synth.v example_tb.v `yosys-config --datdir/ice40/cells_sim.v` chmod -x synth_tb.vvp synth_sim: synth_tb.vvp @@ -48,7 +48,7 @@ route.v: example.asc icebox_vlog -L -n top -sp example.pcf example.asc > route.v route_tb.vvp: example_tb.v route.v - iverilog -o route_tb.vvp -s testbench route.v example_tb.v /usr/local/share/yosys/ice40/cells_sim.v + iverilog -o route_tb.vvp -s testbench route.v example_tb.v `yosys-config --datdir/ice40/cells_sim.v` chmod -x route_tb.vvp route_sim: route_tb.vvp