From: Florent Kermarrec Date: Thu, 12 Sep 2019 15:07:56 +0000 (+0200) Subject: build/openocd: add set_qe parameter to flash X-Git-Tag: 24jan2021_ls180~1015 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c120f6d457e267c085ae8f5a2712cc040073af42;p=litex.git 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. --- 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"