Skip to content

Commit

Permalink
build/openfpgaloader: Add unprotect_flash capability.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Oct 13, 2023
1 parent fac003b commit e499dd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion litex/build/openfpgaloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ def load_bitstream(self, bitstream_file):
cmd = self.cmd + ["--bitstream", bitstream_file]
self.call(cmd)

def flash(self, address, data_file, external=False, verify=False):
def flash(self, address, data_file, external=False, unprotect_flash=False, verify=False):
cmd = self.cmd + ["--write-flash", "--bitstream", data_file]
if external:
cmd += ["--external-flash"]
if address:
cmd += ["--offset"]
cmd += [str(address)]
if unprotect_flash:
cmd += ["--unprotect-flash"]
if verify:
cmd += ["--verify"]
self.call(cmd)

0 comments on commit e499dd8

Please sign in to comment.