platforms/lambdaconcept_ecpix5.py: create_programmer: added option to select between r03 version (FT4232) and provious (FT2232)

This commit is contained in:
Gwenhael Goavec-Merou 2024-06-14 15:46:36 +02:00
parent 1b22061e93
commit 6e6246d718
1 changed files with 3 additions and 2 deletions

View File

@ -176,8 +176,9 @@ class Platform(LatticeECP5Platform):
assert device in ["45F", "85F"]
LatticeECP5Platform.__init__(self, f"LFE5UM5G-{device}-8BG554I", _io, _connectors, toolchain=toolchain, **kwargs)
def create_programmer(self):
return OpenFPGALoader("ecpix5")
def create_programmer(self, version="r02"):
board_name = {True: "ecpix5_r03", False: "ecpix5"}[version=="r03"]
return OpenFPGALoader(board_name)
def do_finalize(self, fragment):
LatticeECP5Platform.do_finalize(self, fragment)