Using the iCEBreaker with an Open Source FPGA toolchain on OS X

iCEBreaker

iCEBreaker

When I used FPGAs in the past, e.g. for my LED Display, I was using Xilinx FPGAs with their proprietary software which unfortunately runs only under Windows or Linux. This was very inconvenient and in addition the software was slow as hell.

Fortunately a new era has begun: Open-Source FPGA toolchains! It was started some time back by Clifford Wolf, who first wrote a synthesis tool called Yosys and later reverse-engineered the bitstream format for Lattice iCE-40 FPGAs. Recently a new place-and-route tool called nextpnr was developed as well. Clifford has given several talks about those tools at various events which are worth watching:

At 35C3 @esden gave several workshops explaining this toolchain using the iCEBreaker board. Although I didn't have the fortune to attend one of this workshops I had the chance to chat with @esden and he was kind enough to give me an iCEBreaker to play with.

Installing all the tools on OS X in a non-invasive way was a little bit tricky and therefor I created some homebrew recipes for easy usage. To get started with the Open Source FPGA Toolchain and the iCEBreaker board you need to follow the following steps:

  1. Tap my homebrew recipes using
    brew tap twam/openfpga
  2. Install yosys using
    brew install yosys
  3. Install icestorm using
    brew install icestorm
  4. Install nextpnr using
    brew install nextpnr --without-gui --without-arch-ecp5

    You can also install nextpnr with GUI and the additional ECP5 architecture, but this takes much longer and is not required for the iCEBreaker

  5. Clone the iCEBreaker examples using
    git clone https://github.com/icebreaker-fpga/icebreaker-examples.git
  6. Go to your favorite example, e.g. using
    cd icebreaker-examples/blink_count_shift
  7. Build the example using
    make
  8. Connect your iCEBreaker via USB and run the example using
    make prog

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.