Using iCE40HX1K-EVB under Windows


Windows is still most popular desktop platform and many people use it. So far all our blogs were how to use iCE40HX1K-EVB with Linux and IceStorm Free and Open Source tools.

What are the options for Windows users? I can think of three options at glance:

  • Virtual machine: you can install VirtualBox or VMware Player then to install Linux OS on the Virtual Machine like Ubuntu or better Xubuntu which requires less resources and do not uses Unity 3D effects ;
  • Cygwin is another option and offers Linux like tools in Windows environment. You will be able to compile IceStorm from sources;
  • Wubi allows you to install Linux as Windows program, not dealing with disk partitioning and such, you install Linux, then if you want to remove just go to Control Panel and remove it as installed program;

Perhaps there are other ways to use Linux software under Windows, but these three are probably most popular.

Of course Windows users have one more options and this is the original Lattice FPGA software called iCEcube2. Here we will go through installation process of these tools too and how to use them with iCE40HX1K-EVB.

Intalling the iCEcube2 IDE and generating bit file.

First you have to go to Lattice Semiconductor web site and to register. You will have to fill lot of personal and work info and apply for registration then waiting your account to be created and you will get e-mail which you have to use to activate it. The account registration may take from few hours up to 1 day.

Once your account is activated you can go to Products -> Software Tools -> iCEcube2 and to download it.

To install it you will need to apply for Free License including information for the MAC address on your computer where the software will run! You can see the difference between IceStom and iCEcube2 in the first you have no restrictions whatsoever, the only free thing in the latter is that it’s cost-free you have no other freedom. Lattice may shut you down from using it at any time. Why is this? Edmund explained it well in his lecture at TuxCon 2016. Lattice didn’t made these tools, they buy from 3rd party, this is why they should have way to count their users to may pay licensee fees to the software vendor (you will see restriction iCEcube2 to be licensed by Cadence employees probably to not abuse Lattice with many licensees which Lattice pays for). Lattice make money only from selling chips, and generates loss from users who use small amount of chips like startups, small developers, people who learn FPGAs, as they use the tools but do not buy many chips which to justify the development tools price they pay to the vendor. So the tools they provide are named to be “free” but they are only cost-free, sponsored by Lattice.

When download it you should select Windows version:


Click on the Download button and select save the .zip file.


While your zip file is downloading go back to the iCEcube2 page and request you cost-free license.


Enter your MAC address and click on Generate License. If you enter a wrong MAC address iCEcube2 will not be able to start. You can request a new license with the correct MAC address.

To learn what your MAC address is run ‘cmd’ and type ipconfig /all .


Go to your email and you should see a new email, with the license file attached (license.dat). Save it to a convenient location.

After the iCEcube2 .zip file has finished downloading simply unzip it and run the .exe inside. During the installation you must provide the path to the license file:


Then the installation is fairly a straight-forward process and you can run the iCEcube2 IDE.

Double click on New Project on the left panel and fill the form and click Next.

You can download some examples for the iCE40HX1K-EVB from GitHub. The example should have at least two files: one is the Verilog (or VHDL) code and the other is the .pcf pin constraint file.7jpg

Click on Next and Finish, we will add the design and constraint files later manually.


First add the Verilog file: right-click on Design Files and select the .v file and add it to the project using the >> button or just double-clicking on it and click OK.


Then click on Constraint Files and add the .sdc file:


And then right-click on Constraint Files under P&R flow for the .pcf file:


Finally click on Tool->Run All:


The synthesis process should start and at the end will look like this:


From all the 3MB files that are generated only the .bin file is what we will use to upload to the FPGA.

You can compare the process with IceStorm where you only have to have two files and simple issue one command  ‘make’ compared to the claimed to be easier to use windows interface to  create the simple blink LED project.

Programming the iCE40-HX1K-EVB board with winiceprogduino

There are two types of programming: one is programming the iCE40HX1K-EVB on-board flash memory, which the FPGA reads every time it resets, and the other is directly programming (which often is described as configuring) the FPGA (the configuration is lost after power down / reset therefore).

Olimex provides a programming tool for Windows that uses the Olimexino-32U4 to program the SPI flash of the iCE40HX1K-EVB. First you need to program Olimexino-32U4 with the iceprogduino sketch as explained here. Arduino works under Windows too so the procedure is same as with Linux.

Then you need winiceprogduino.exe which programs the FPGA with the previously generated bin file. winiceprogduino is same as the linux iceprogduino but re-compiled for Windows with the DevC++ compiler.

You can download project, sources and pre-compiled version from GitHub. winiceprogduino takes COM port (the port that is assigned from Windows for Olimexino-32U4) and target file (the bin file we generated earlier with iCEcube2) as arguments and sends the file to the Olimexino-32U4 which programs it to the SPI flash or directly configures the FPGA, depending on the options you selected.

You can run winiceprogduino.exe and will see all options:


When you plug Olimexino-32U4 to your computer go to Device Manager and see which COM port is assigned to it. In our case it was COM10 and to program the blink led bin we should type:


FPGA will be programmed and you will see the LED1 and LED2 blinking.

Now you are set to create your own projects with iCEcube2. Have fun!


2 Comments (+add yours?)

  1. SK
    Aug 09, 2016 @ 00:29:54

    Another OSHW design with ice40, even has “Olimex” style connector 🙂


  2. LubOLIMEX
    Aug 24, 2016 @ 11:03:37

    Please note that all signals needed for programming iCE40HX1K-EVB are at 3.3V DC! If you program iCE40HX1K-EVB via the PGM1 connector make sure that your “programmer” board works at 3.3V (some Arduino boards work at 5V only)!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: