From 729c94d88577a05da68aa763ceb0d3e70e6124a8 Mon Sep 17 00:00:00 2001 From: Luigi Giuffrida <32927727+Luigi2898@users.noreply.github.com> Date: Tue, 13 Feb 2024 21:12:26 +0100 Subject: [PATCH] Add a target to the Makefile to directly program the FPGA (#450) --- Makefile | 3 +++ README.md | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0a7e47864..b4367afd3 100644 --- a/Makefile +++ b/Makefile @@ -201,6 +201,9 @@ vivado-fpga: vivado-fpga-nobuild: $(FUSESOC) --cores-root . run --no-export --target=$(FPGA_BOARD) $(FUSESOC_FLAGS) --setup openhwgroup.org:systems:core-v-mini-mcu ${FUSESOC_PARAM} 2>&1 | tee buildvivado.log +vivado-fpga-pgm: + $(MAKE) -C build/openhwgroup.org_systems_core-v-mini-mcu_0/$(FPGA_BOARD)-vivado pgm + ## @section ASIC ## Note that for this step you need to provide technology-dependent files (e.g., libs, constraints) asic: diff --git a/README.md b/README.md index 238fcbdd6..7d70ff44d 100644 --- a/README.md +++ b/README.md @@ -524,7 +524,19 @@ To program the bitstream, open Vivado, open --> Hardware Manager --> Open Target --> Autoconnect --> Program Device ``` -and choose the file `openhwgroup.org_systems_core-v-mini-mcu_0.bit` +and choose the file `openhwgroup.org_systems_core-v-mini-mcu_0.bit`. + +Or simply type: + +``` +bash vivado-fpga-pgm FPGA_BOARD=pynq-z2 +``` + +or + +``` +make vivado-fpga-pgm FPGA_BOARD=nexys-a7-100t +``` To run SW, follow the [Debug](./Debug.md) guide to load the binaries with the HS2 cable over JTAG,