mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
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
1 changed files with 8 additions and 3 deletions
|
@ -15,8 +15,13 @@ class OpenFPGALoader(GenericProgrammer):
|
||||||
def __init__(self, board):
|
def __init__(self, board):
|
||||||
self.board = 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]
|
cmd = ["openFPGALoader", "--board", self.board, "--bitstream", bitstream_file]
|
||||||
if flash:
|
self.call(cmd)
|
||||||
cmd.append("--write-flash")
|
|
||||||
|
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)
|
self.call(cmd)
|
||||||
|
|
Loading…
Reference in a new issue