@@ -121,35 +121,11 @@ class _ECPIX5Platform(LatticeECP5Platform):
121
121
Connector ("pmod" , 7 , "D14 B14 E14 B16 - - C14 A14 A15 A16 - -" ),
122
122
]
123
123
124
- @property
125
- def file_templates (self ):
126
- return {
127
- ** super ().file_templates ,
128
- "{{name}}-openocd.cfg" : r"""
129
- interface ftdi
130
- ftdi_vid_pid 0x0403 0x6010
131
- ftdi_channel 0
132
- ftdi_layout_init 0xfff8 0xfffb
133
- reset_config none
134
- adapter_khz 25000
135
-
136
- {% if "85F" in platform.device -%}
137
- jtag newtap ecp5 tap -irlen 8 -expected-id 0x81113043 ; # LF5UM5G-85F
138
- {% else -%}
139
- jtag newtap ecp5 tap -irlen 8 -expected-id 0x81112043 ; # LF5UM5G-45F
140
- {% endif %}
141
- """
142
- }
143
-
144
124
def toolchain_program (self , products , name ):
145
- openocd = os .environ .get ("OPENOCD" , "openocd" )
146
- with products .extract ("{}-openocd.cfg" .format (name ), "{}.svf" .format (name )) \
147
- as (config_filename , vector_filename ):
148
- subprocess .check_call ([openocd ,
149
- "-f" , config_filename ,
150
- "-c" , "transport select jtag; init; svf -quiet {}; exit" .format (vector_filename )
151
- ])
152
-
125
+ import os , subprocess
126
+ tool = os .environ .get ("OPENFPGALOADER" , "openFPGALoader" )
127
+ with products .extract ("{}.bit" .format (name )) as bitstream_filename :
128
+ subprocess .check_call ([tool , '-c' , 'ft2232' , '-m' , bitstream_filename ])
153
129
154
130
class ECPIX545Platform (_ECPIX5Platform ):
155
131
device = "LFE5UM5G-45F"
0 commit comments