build/lattice/programmer: Add ecpprog-based programmer

This commit is contained in:
David Sawatzke 2021-08-11 18:46:16 +02:00
parent ab9f214a5e
commit 9b8253c016
1 changed files with 15 additions and 0 deletions

View File

@ -185,3 +185,18 @@ class EcpDapProgrammer(GenericProgrammer):
"--freq", str(self.frequency_khz), "--freq", str(self.frequency_khz),
bitstream_file bitstream_file
]) ])
# EcpprogProgrammer -------------------------------------------------------------------------------
class EcpprogProgrammer(GenericProgrammer):
"""ecpprog allows you to program ECP5 FPGAs and attached SPI flash using FTDI based JTAG probes
You can get `ecpprog` here: https://github.com/gregdavill/ecpprog
"""
needs_bitreverse = False
def flash(self, address, bitstream_file):
self.call(["ecpprog", "-o", str(address), bitstream_file])
def load_bitstream(self, bitstream_file):
self.call(["ecpprog", "-S", bitstream_file])