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.
This commit is contained in:
parent
6a0a1c9d87
commit
c120f6d457
|
@ -24,11 +24,12 @@ class OpenOCD(GenericProgrammer):
|
||||||
])
|
])
|
||||||
subprocess.call(["openocd", "-f", self.config, "-c", script])
|
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()
|
flash_proxy = self.find_flash_proxy()
|
||||||
script = "; ".join([
|
script = "; ".join([
|
||||||
"init",
|
"init",
|
||||||
"jtagspi_init 0 {{{}}}".format(flash_proxy),
|
"jtagspi_init 0 {{{}}}".format(flash_proxy),
|
||||||
|
"jtagspi set_qe 0 1" if set_qe else "",
|
||||||
"jtagspi_program {{{}}} 0x{:x}".format(data, address),
|
"jtagspi_program {{{}}} 0x{:x}".format(data, address),
|
||||||
"fpga_program",
|
"fpga_program",
|
||||||
"exit"
|
"exit"
|
||||||
|
|
Loading…
Reference in New Issue