Add flash method to openFPGALoader class for support with generic_programmer usage (needed for linux-on-litex-vexriscv) + add offset/address support for firmware load
This commit is contained in:
parent
69307cfdde
commit
18a5ace637
|
@ -15,8 +15,13 @@ class OpenFPGALoader(GenericProgrammer):
|
|||
def __init__(self, board):
|
||||
self.board = board
|
||||
|
||||
def load_bitstream(self, bitstream_file, flash=False):
|
||||
def load_bitstream(self, bitstream_file):
|
||||
cmd = ["openFPGALoader", "--board", self.board, "--bitstream", bitstream_file]
|
||||
if flash:
|
||||
cmd.append("--write-flash")
|
||||
self.call(cmd)
|
||||
|
||||
def flash(self, address, data_file):
|
||||
cmd = ["openFPGALoader", "--board", self.board, "--write-flash", "--bitstream", data_file]
|
||||
if address:
|
||||
cmd.append("--offset")
|
||||
cmd.append(address)
|
||||
self.call(cmd)
|
||||
|
|
Loading…
Reference in New Issue