Skip to content

Commit

Permalink
Merge pull request FPGAwars#229 from benitoss/develop
Browse files Browse the repository at this point in the history
ECP5 Boards added
  • Loading branch information
Juan Gonzalez-Gomez authored Apr 18, 2021
2 parents 45525ff + 392da04 commit b5273e9
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 24 deletions.
108 changes: 87 additions & 21 deletions apio/resources/boards.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,29 +481,95 @@
"pid": "602b"
}
},
"iCESugar-nano": {
"name": "iCESugar-nano",
"fpga": "iCE40-LP1K-CM36",
"ColorLight-5A-75B-V61": {
"name": "ColorLight-5A-75B-V61",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "icesprog"
},
"usb": {
"vid": "1d50",
"pid": "602b"
"type": "openfpgaloader"
}
},
"OK-iCE40Pro": {
"name": "OK-iCE40Pro",
"fpga": "iCE40-UP5K-SG48",
"ColorLight-5A-75B-V7": {
"name": "ColorLight-5A-75B-V7",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "iceprog"
},
"usb": {
"vid": "0403",
"pid": "6010"
},
"ftdi": {
"desc": "Dual RS232-HS"
"type": "openfpgaloader"
}
},
"ColorLight-5A-75B-V8": {
"name": "ColorLight-5A-75B-V8",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "openfpgaloader"
}
},
"ColorLight-5A-75E-V6": {
"name": "ColorLight-5A-75E-V6",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "openfpgaloader"
}
},
"ColorLight-5A-75E-V71_(FT2232H)": {
"name": "ColorLight-5A-75E-V71",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "openfpgaloader_ft2232"
}
}
}
},
"ColorLight-5A-75E-V71_(FT232H)": {
"name": "ColorLight-5A-75E-V71",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "openfpgaloader_ft232"
}
},
"ColorLight-5A-75E-V71_(USB-Blaster)": {
"name": "ColorLight-5A-75E-V71",
"fpga": "ECP5-LFE5U-25F-CABGA256",
"programmer": {
"type": "openfpgaloader_usb-blaster"
}
},
"ColorLight-i5-v7.0_(FT2232H)": {
"name": "ColorLight-i5",
"fpga": "ECP5-LFE5U-25F-CABGA381",
"programmer": {
"type": "openfpgaloader_ft2232"
}
},
"ColorLight-i5-v7.0_(FT232H)": {
"name": "ColorLight-i5",
"fpga": "ECP5-LFE5U-25F-CABGA381",
"programmer": {
"type": "openfpgaloader_ft232"
}
},
"ColorLight-i5-v7.0_(USB-Blaster)": {
"name": "ColorLight-i5",
"fpga": "ECP5-LFE5U-25F-CABGA381",
"programmer": {
"type": "openfpgaloader_usb-blaster"
}
},
"iCESugar-Pro_(FT2232H)": {
"name": "ColorLight-i5",
"fpga": "ECP5-LFE5U-25F-CABGA381",
"programmer": {
"type": "openfpgaloader_ft2232"
}
},
"iCESugar-Pro_(FT232H)": {
"name": "ColorLight-i5",
"fpga": "ECP5-LFE5U-25F-CABGA381",
"programmer": {
"type": "openfpgaloader_ft232"
}
},
"iCESugar-Pro_(USB-Blaster)": {
"name": "ColorLight-i5",
"fpga": "ECP5-LFE5U-25F-CABGA381",
"programmer": {
"type": "openfpgaloader_usb-blaster"
}
}
}
12 changes: 12 additions & 0 deletions apio/resources/programmers.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,17 @@
"icesprog": {
"command": "icesprog",
"args": ""
},
"openfpgaloader_ft2232": {
"command": "openfpgaloader",
"args": "-c ft2232"
},
"openfpgaloader_ft232": {
"command": "openfpgaloader",
"args": "-c ft232"
},
"openfpgaloader_usb-blaster": {
"command": "openfpgaloader",
"args": "-c usb-blaster"
}
}
11 changes: 8 additions & 3 deletions apio/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def setup_environment():
'fujprog': get_package_dir('toolchain-fujprog'),
'icesprog': get_package_dir('toolchain-icesprog'),
'dfu' : get_package_dir('toolchain-dfu'),
'openfpgaloader' : get_package_dir('toolchain-ecp5')
}

bin_dir = {
Expand All @@ -239,6 +240,7 @@ def setup_environment():
'fujprog': safe_join(base_dir.get('fujprog'), 'bin'),
'icesprog': safe_join(base_dir.get('icesprog'), 'bin'),
'dfu': safe_join(base_dir.get('dfu'), 'bin'),
'openfpgaloader': safe_join(base_dir.get('openfpgaloader'), 'bin')
}

# Give the priority to the python packages installed with apio
Expand All @@ -257,7 +259,7 @@ def setup_environment():
bin_dir.get('fujprog'),
bin_dir.get('icesprog'),
bin_dir.get('dfu'),

bin_dir.get('openfpgaloader'),
os.environ['PATH']
])

Expand Down Expand Up @@ -294,7 +296,8 @@ def resolve_packages(packages, installed_packages, spec_packages):
'gtkwave': get_package_dir('tool-gtkwave'),
'fujprog': get_package_dir('toolchain-fujprog'),
'icesprog': get_package_dir('toolchain-icesprog'),
'dfu': get_package_dir('toolchain-dfu')
'dfu': get_package_dir('toolchain-dfu'),
'openfpgaloader': get_package_dir('toolchain-ecp5')
}

bin_dir = {
Expand All @@ -308,7 +311,8 @@ def resolve_packages(packages, installed_packages, spec_packages):
'gtkwave': safe_join(base_dir.get('gtkwave'), 'bin'),
'fujprog': safe_join(base_dir.get('fujprog'), 'bin'),
'icesprog': safe_join(base_dir.get('icesprog'), 'bin'),
'dfu': safe_join(base_dir.get('dfu'), 'bin')
'dfu': safe_join(base_dir.get('dfu'), 'bin'),
'openfpgaloader': safe_join(base_dir.get('openfpgaloader'), 'bin')
}

# -- Check packages
Expand Down Expand Up @@ -341,6 +345,7 @@ def resolve_packages(packages, installed_packages, spec_packages):
bin_dir.get('fujprog'),
bin_dir.get('icesprog'),
bin_dir.get('dfu'),
bin_dir.get('openfpgaloader'),
os.environ['PATH']
])

Expand Down

0 comments on commit b5273e9

Please sign in to comment.