Add ECPDAP programmer
This commit is contained in:
parent
4092180662
commit
0fe2477f69
|
@ -147,3 +147,30 @@ class UJProg(GenericProgrammer):
|
||||||
|
|
||||||
def load_bitstream(self, bitstream_file):
|
def load_bitstream(self, bitstream_file):
|
||||||
self.call(["ujprog", bitstream_file])
|
self.call(["ujprog", bitstream_file])
|
||||||
|
|
||||||
|
# EcpDapProgrammer -------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class EcpDapProgrammer(GenericProgrammer):
|
||||||
|
"""ECPDAP allows you to program ECP5 FPGAs and attached SPI flash using CMSIS-DAP probes in JTAG mode.
|
||||||
|
|
||||||
|
You can get `ecpdap` here: https://github.com/adamgreig/ecpdap
|
||||||
|
"""
|
||||||
|
needs_bitreverse = False
|
||||||
|
|
||||||
|
def __init__(self, frequency=8_000_000):
|
||||||
|
self.frequency_khz = frequency // 1000
|
||||||
|
|
||||||
|
def flash(self, address, bitstream_file):
|
||||||
|
self.call(["ecpdap",
|
||||||
|
"flash", "write",
|
||||||
|
"--freq", str(self.frequency_khz),
|
||||||
|
"--offset", str(address),
|
||||||
|
bitstream_file
|
||||||
|
])
|
||||||
|
|
||||||
|
def load_bitstream(self, bitstream_file):
|
||||||
|
self.call(["ecpdap",
|
||||||
|
"program",
|
||||||
|
"--freq", str(self.frequency_khz),
|
||||||
|
bitstream_file
|
||||||
|
])
|
||||||
|
|
Loading…
Reference in New Issue