Using iCE40HX1K-EVB under Windows

FPGA

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:

1

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

2

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

3

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 .

4

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:

6

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.

8

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.

9

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

14

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

11

Finally click on Tool->Run All:

12

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

13

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:

win

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:

prog

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!

 

To spend 30M EURO for something you can have for free – Only in Bulgaria

10 Godini Microsoft Bulgaria Otvoreni Vrati

Bulgarian government will pay EUR 30,000,000.00 yes 30 Millons of EURO to Microsoft for licensee fees for using Windows OS and Office packages for the Bulgarian administration in the next three years.

They pay this amount every three years i.e. about EUR 10M per year are spent on something which have completely free and open source alternative which every one could use free of charge.

Seems not very logical?

Not quite, you forget that this is the Bulgarian government. The government administration officers here have one and only target when they get in power – to cash their efforts.

What they could cash if there is no money to spend on free Linux OS?

Nothing, but when they spend EUR 10 Millions on software you can bet that quite nice amount of this money go back into the pockets of who spends the money 🙂

Tip – one and same company “wins” all these tenders for the last 14 years, even if they give highest price bid.

Total more than EUR 100 millions since ywar 2001. Should we comment further?

What if these 100 Millions were invested in the Bulgarian education instead to fill the pockets of corrupted administration and Microsoft? We never know as this would never happen here.

And please do not tell me that windows is easier to use than Linux, this is something which only one who never used both OS could tell.

We drop using Windows in Olimex since years, the only problem which we faced ever was missing support for old Cannon printer which went to the garbage, we switched to HP printers for good and never regret on this.

 

EDIT: Some people may say – big deal 30 millions EURO is not big amount for government to spend. Do not forget this is for small Bulgaria, to compare with UK for instance which have exactly 61 times bigger GDP, to spend 30 millions EURO in Bulgaria is equal UK government to spend 1830 millions of EURO for MS licensees. This is to show how effectively  Bulgarian government spends taxpayer’s money.

Microsoft and Arduino – New partnership

windowsarduino

http://blog.arduino.cc/2015/04/30/microsoft-and-arduino-new-partnership/

Arduino developers seems have lost their focus lately and make mistake after mistake!

Everybody knows that the success formula to Arduino was to keep it simple so the beginners to may use it without knowing in deep electronics and programming but simple reusing code made from Arduino team and community.

For many years AVR simple 8-bit processors serveed well Arduino, but later they were tempted to make the Mega (IMO not quite successful as expensive) then the misunderstanding named Yun which was sold for $60 while there are routers with same chip for $10. Then Intel bribed them to add totally different architecture just to ride the “Arduino” wave.

How much useful is all this diversification? Not much I would say if I count the projects which are using Arduino and simple 8-bit AVRs are still 99% of all projects. So who need all this new crap? It just confuses the beginners.

Then came the bad news for the Arduino trademark dispute which sent bad message to the community taking the dirty laundry to the pubic in the court.

Now we read for the latest news – Microsoft the symbol for closed source company bribed Arduino team for a partnership “Windows10 is the first Arduino certified OS”

WTF? How much did you guys got for this ‘certification’ and what message do you send to Open Source community with this?

Are you so desperate for $$$ after the split with Gianluca who manufacture and sells the ‘original’ Arduinos without paying licensee to the development team.

For many years Arduino was example for the most successful Open Source project ever. With this announcement we see that now everything changes and it’s simple matter of money.

Windows 8.2 for A10-LIME released! Windows now run on small low cost EUR 30 ARM board

Image

 

We are happy to tell you that we now have Windows 8.2 running on A10-LIME – the EUR 30 low cost ARM board.

On the picture above you see how the A10-LIME desktop looks like.

Instructions how to build your own Windows 8.2 SD-card image from Windows sources will follow, we are preparing it now.

Last week we keep playing with A10-LIME running Windows 8.2 and we are amazing how easy and intuitive is the work with it now, needless to say it runs twice faster than Debian and Ubuntu due to the magical Windows SD card cache accelerator.

A10-LIME HDMI output allow playing FullHD 1080p movies and as it have native Ethernet and SATA it’s perfect for Windows Server applications. The build in LiPo charger ends the era of expensive UPS solutions for server apps, now you just connect small LiPo battery and your UPS is up and running.

 

16 things I like in Linux which don’t exist in Windows

Image

First I want to make remark that I’m not Linux die-hard, I can work on any OS if necessary, but there are some things which I like in Linux and which I miss when I have to sit on Windows machine.

Lot of people who never try Linux tell me how easy is Windows to work with, this is not true.

Nowadays it’s equally easy to use both Linux and Windows and it’s just matter of stereotype and habits to feel more convenience on one OS vs other.

I used to work on WIndows for decade, then switched on Linux and few months ago my wife asked me to set password on my son’s laptop (to have way to regulate the time he spend in the front of the computer) which had Windows pre-installed when we bought it.

I start searching and I lost several minutes until I find where it was in the Control panel to set password for user. Does this means Windows became less easy to use with the time?

No I just got used to Linux and this is why it seems to me now that Linux is easier to use.

Same is for the Windows users which have not sit on Linux before, they will need couple of weeks to get familiar, then everything will be equally easy to them in both Windows and Linux.

But let’s start with the list:

1. Linux updates and upgrades do not require you to reboot

Re-booting after every software installation or update is very annoying in Windows. I keep wondering why this is not necessary in Linux, but on Windows is rule of tumb – every installation is asking you to re-boot, or after you download the Upgrades annoying window pop up and say – will reboot in 10 minutes, save your work. This is really annoying.

2. No need to install drivers every time you plug in your computer USB device

OK, I understand that there are custom devices which use uncommon drivers like printers, cameras, etc, but why on earth every time you plug in Windows simple mass storage disk drive, or USB-Serial converter, or Mouse, or Keyboard – devices which are standard and are embedded in every Windows OS after W98 it ALWAYS ask for drivers which are already there? Why on Linux I plug the external HHD or Flash drive and it automatically mounts on my computer and I can work with it, while Windows is asking me for drivers and several minutes scans and show me different windows with warnings and Continue buttons like I’m doing something scaring which may ruin my OS??? This is just ridiculous.

3. You can move image/boot-able drive between machines without need for reinstall

Yes! this is something windows users can’t imagine is possible! I do remember back in the dark ages Windows asked me to re-install after I have upgraded the RAM memory size! Now imagine you get your Windows boot-able HDD and plug it on other computer, will it boot? no way!

4. system config in files not registers mess

Now this is one of the most annoying WIndows features – after several months of installing and removing software your registers and windows/system directory becomes so bloated with shared DLLs and mess that some people start making money by writing registry cleaning software!

5. You can’t boot windows from USB Stick

Probably they didn’t find a way to ask you for registration and to collect your money every time they sense this USB is plug to other computer??

6. You cant see this on Windows:

# uptime
15:54PM up 122 days, 11:22, 5 users, load average: 0.12, 0.30, 0.13

every few days if you do not reboot windows machine it starts to act slowly due to the severe memory fragmentation

7. Synaptic Package manager – search and install software with convenience

In Windows of course this is not possible as there are no software repositories – to have access to most significant software packages from one source.

8. In Linux you can download the sources of every software you install

and you can learn how it works, compile and if you want and can you can modify or tailor for your needs, adding new functionality for instance.

9. Tab complete your command in the shell

even if I do not remember the complete command name I just press Tab and it reminds me

10. You can choose from different windows managers

KDE, Gnome, Cinnamon, Enlightenment… you don’t like GUI? no problem, just remove it completely!

11. Linux have no path name length limit

(windows cant handle names bigger than 248 characters)

12. You cant do in Windows

$ find . -type f -exec cat {} \; | grep "search text"

13. Linux has less malware

…as it doesnt execute every file found in the wild

14. no file auto-runs every time you plug new disk

please tell me who else than malware and viruses use this feature?

15. Windows has no “touch” command

why Microsoft? it’s easy to make one

16. I can install Linux on as many computers I want without paying for licensees

this is something I most appreciate, no anti-piracy TV ads, no threats for your business anymore!

Long Live the Freedom! 🙂