Skip to content
An Arduino UNO compatible implementation for the iCE40 FPGAs
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


An Arduino UNO compatible implementation for the iCE40 FPGAs

Currently oriented to the Kefir I board (iCE40HX4K + Arduino/ChipKit connectors and MCP3008 A/D)

A reduced version (only I/O pins and RS-232, with a small ammount of flash and RAM) is available for the iCEStick and IceZum Alhambra is available (iCE40HX1K).

What's needed to synthesize the IP core

You need to install the Lattice iCECube2 tool.

You should also install some of the FPGA Libre tools. The lattuino-tools package will pull all the needed dependencies.

For Ubuntu:

usuario@ubuntu$ curl -sSL | sudo sh
usuario@ubuntu$ sudo apt-get install lattuino-tools

For Debian:

root@debian# curl -sSL | sh
root@debian# apt-get install lattuino-tools

How to run the synthesis

This core depends on various cores from the FPGA Libre project. In order to install the dependencies you'll need to clone the FPGA Cores repo.

Once installed you'll find a script called Modify the XIL_TOOLS_ICE_DIR variable to point to your iCECube2 installation. Then run the script.

For the iCEStick/IceZum the script is called Note that we included a pre-generated bitstream: lattuino/FPGA/lattuino_stick/pre-gen/Lattuino_Stick_bitmap.bin. Also note that the core fits very tightly, so you could have issues if using an iCEcube2 different than version 2017.01.

How to add Lattuino support to the Arduino IDE

You'll need a modern version of Arduino's IDE, I used 1.8.1 (works on 1.8.2 and also on 1.6.13, not in 1.6.9)

  1. Go to File/Preferences menu
  2. Add the following URL as source of additional boards
  3. Now enter to the Tool/Board menu and choose the Boards manager option.
  4. Scroll down to bottom and look for the Lattuino 1 by FPGA Libre entry.
  5. Click on More info and press the Install button.
  6. Once installed you'll get a new section under Tool/Board named Lattuino.

How to configure the core

You can manually edit FPGA/lattuino_1/cpuconfig.vhdl or you can use the configuration tool.

To run the configuration tool you need TCL/Tk installed (UNIX wish command or Cygwin's cygwish80). Then run:

make -C tools/tkconfig/ xconfig

Note that this will most probably try to rebuild some tools. If you don't have the GCC compiler installed you can just run:

touch tools/tkconfig/tkparse.o tools/tkconfig/tkcond.o tools/tkconfig/tkgen.o tools/tkconfig/tkparse
touch tools/tkconfig/ 
touch tools/tkconfig/ 
make -C tools/tkconfig/ xconfig
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.