From ba520feeed08e15ad6db955aece9b6b71d9a259c Mon Sep 17 00:00:00 2001 From: Marno van der Maas Date: Tue, 31 Oct 2023 14:28:17 +0000 Subject: [PATCH 1/2] Fix path to blank memory file This was causing a critical warning in Vivado --- ibex_demo_system.core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibex_demo_system.core b/ibex_demo_system.core index dc54e386..a74a12bf 100644 --- a/ibex_demo_system.core +++ b/ibex_demo_system.core @@ -72,7 +72,7 @@ parameters: SRAMInitFile: datatype: str description: SRAM initialization file in vmem hex format - default: "../../../../../sw/build/blank/blank.vmem" + default: "../../../../../sw/c/build/blank/blank.vmem" paramtype: vlogparam # For value definition, please see ip/prim/rtl/prim_pkg.sv From af7a82ea95f5b8e197377c2a6c7a1cf3a28703d8 Mon Sep 17 00:00:00 2001 From: Marno van der Maas Date: Tue, 31 Oct 2023 14:30:28 +0000 Subject: [PATCH 2/2] Fix software path in Nix flake --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index fef56235..4dbf0aae 100644 --- a/flake.nix +++ b/flake.nix @@ -110,22 +110,22 @@ helpstr=$(cat <<'EOF' Build ibex software : - mkdir sw/build && pushd sw/build && cmake ../ && make && popd + mkdir sw/c/build && pushd sw/c/build && cmake ../ && make && popd Build ibex simulation verilator model : fusesoc --cores-root=. run --target=sim --tool=verilator --setup --build lowrisc:ibex:demo_system Run ibex simulator verilator model : ./build/lowrisc_ibex_demo_system_0/sim-verilator/Vibex_demo_system -t \ - --meminit=ram,sw/build/demo/hello_world/demo + --meminit=ram,sw/c/build/demo/hello_world/demo Build ibex-demo-system FPGA bitstream for Arty-A7 : fusesoc --cores-root=. run --target=synth --setup --build lowrisc:ibex:demo_system Program Arty-A7 FPGA with bitstream : openFPGALoader -b arty_a7_35t build/lowrisc_ibex_demo_system_0/synth-vivado/lowrisc_ibex_demo_system_0.bit Load ibex software to the programmed FPGA : - ./util/load_demo_system.sh run ./sw/build/demo/lcd_st7735/lcd_st7735 + ./util/load_demo_system.sh run ./sw/c/build/demo/lcd_st7735/lcd_st7735 Start an OpenOCD instance, connected to the Arty-A7 ibex openocd -f util/arty-a7-openocd-cfg.tcl Connect gdb to a running program on the FPGA (In a different terminal to the OpenOCD instance): - riscv32-unknown-elf-gdb -ex "target extended-remote localhost:3333" ./sw/build/demo/hello_world/demo + riscv32-unknown-elf-gdb -ex "target extended-remote localhost:3333" ./sw/c/build/demo/hello_world/demo To leave the environment: exit