From 8afc9a5b03c99bf981b567a226baab96e8babc7a Mon Sep 17 00:00:00 2001 From: Ilya Epifanov Date: Sat, 28 Mar 2020 11:27:34 +0100 Subject: [PATCH] programming the ECP5-EVN flash through the OpenOCD JTAG-SPI proxy --- litex_boards/platforms/ecp5_evn.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/litex_boards/platforms/ecp5_evn.py b/litex_boards/platforms/ecp5_evn.py index 364adb2..b7aedb9 100644 --- a/litex_boards/platforms/ecp5_evn.py +++ b/litex_boards/platforms/ecp5_evn.py @@ -3,6 +3,9 @@ from litex.build.generic_platform import * from litex.build.lattice import LatticePlatform +from litex.build.lattice.programmer import OpenOCDJTAGProgrammer + +import os # IOs ---------------------------------------------------------------------------------------------- @@ -126,7 +129,5 @@ class Platform(LatticePlatform): return LatticePlatform.request(self, *args, **kwargs) def create_programmer(self): - pass - # fdir = os.path.join( - # os.path.abspath(os.path.dirname(__file__)), "prog") - # return OpenOCD(os.path.join(fdir, "ecp5-evn.cfg")) + trellis = os.environ.get("TRELLIS", "/usr/share/trellis") + return OpenOCDJTAGProgrammer(os.path.join(trellis, "misc", "openocd", "ecp5-evn.cfg"), "bscan_spi_lfe5um5g85f.svf")