From c120f6d457e267c085ae8f5a2712cc040073af42 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 12 Sep 2019 17:07:56 +0200 Subject: [PATCH] build/openocd: add set_qe parameter to flash QE bit is not set on blank SPI flashes and need to be set when SPI X4 is enabled in the bistream to load the FPGA. --- litex/build/openocd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litex/build/openocd.py b/litex/build/openocd.py index 04b5a7f0..c149ca2c 100644 --- a/litex/build/openocd.py +++ b/litex/build/openocd.py @@ -24,11 +24,12 @@ class OpenOCD(GenericProgrammer): ]) subprocess.call(["openocd", "-f", self.config, "-c", script]) - def flash(self, address, data): + def flash(self, address, data, set_qe=False): flash_proxy = self.find_flash_proxy() script = "; ".join([ "init", "jtagspi_init 0 {{{}}}".format(flash_proxy), + "jtagspi set_qe 0 1" if set_qe else "", "jtagspi_program {{{}}} 0x{:x}".format(data, address), "fpga_program", "exit" -- 2.30.2