From 8ccb1a91c9b27945c0633f7de9feb1875bd5ddc0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 17 Sep 2021 14:37:14 +0200 Subject: [PATCH] build/openfpgaloader/flash: Add external parameter to allow flashing external SPI Flash when available. --- litex/build/openfpgaloader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/build/openfpgaloader.py b/litex/build/openfpgaloader.py index 1f5b0d032..cb639030f 100644 --- a/litex/build/openfpgaloader.py +++ b/litex/build/openfpgaloader.py @@ -25,8 +25,10 @@ class OpenFPGALoader(GenericProgrammer): self.cmd += ["--bitstream", bitstream_file] self.call(self.cmd) - def flash(self, address, data_file): + def flash(self, address, data_file, external=False): self.cmd += ["--write-flash", "--bitstream", data_file] + if external: + self.cmd += ["--external-flash"] if address: self.cmd.append("--offset") self.cmd.append(address)