Skip to content

Instantly share code, notes, and snippets.

@esden
Created June 29, 2020 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esden/1ea86bdc2e03e06894264cc6a891c073 to your computer and use it in GitHub Desktop.
Save esden/1ea86bdc2e03e06894264cc6a891c073 to your computer and use it in GitHub Desktop.
Installing and running nmigen with native binary toolchain on Windows 10

This guide describes the steps necessary to setup the FPGA tools, python, nmigen and zadig drivers for the iCEBreaker-fpga development board on Windows 10.

Download the following software:

Install the following in whichever order:

  • git
  • python

Zadig drivers:

  • plug in icebreaker to your computer
  • wait until it windows recognizes it and indicates that it has finished setting it up
  • run zadig driver installer
  • in the menu select "show all devices"
  • select iCEBreaker (0) device in the drop down menu
  • install winusb driver

open-tool-forge and nmigen:

  • extract the open-tool-forge zip file
  • move the extracted directory to a convenient spot
  • open powershell as admin
  • run the following command: Set-ExecutionPolicy Unrestricted
  • when asked confirm with A
  • close the admin power shell
  • open a normal power shell
  • run the following command to add the fpga toolchain to your path: $env:Path += ";C:\Users\xxxxx\fpga-toolchain-windows_amd64-nightly-yyyyyyyy\fpga-toolchain\bin" (we assume here that you have copied the extracted toolchain to your home directory and the xxxxx stand for your username and yyyyyyyy stands for the date of your toolchain build.
  • create a python venv: python -m venv nmigen-venv
  • activate the created venv: .\nmigen-venv\Scripts\Activate.ps1
  • install nmigen:
pip install git+https://github.com/nmigen/nmigen.git
pip install git+https://github.com/nmigen/nmigen-boards.git
  • Note: If you later get an error that nmigen-yosys package is missing you install it by running: pip install nmigen-yosys

Build an icebreaker example:

  • clone the icebreaker-nmigen-examples repository: git clone https://github.com/icebreaker-fpga/icebreaker-nmigen-examples.git
  • enter the blink example directory: cd icebreaker-nmigen-examples\blink
  • Build and upload the blink example: python blink.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment