After some months, I have finally found the path of least resistance to programming the BlackIce boards using a Windows PC.
apio https://github.com/FPGAwars/apio-ide/wiki is a cross platform IDE that is built on the Atom editor.
Unlike platformio, apio is focused solely on FPGA requirements - whereas Platformio is focused on embedded microcontrollers.
apio brings together the Yosys and Arachne toolchain modules and produces the binary bitfile needed to program the fpga.
It also has the modules required for timing analysis and simulation - all easily at hand as IDE tool-buttons.
For anyone struggling with the myStorm toolchain learning curve, I would recommend the apio solution.
Here are the steps I took:
- Made sure I had python 2.7 installed on my Windows laptop
- Got apio and installed it from here - according to the ReadMe : https://github.com/FPGAwars/apio
- Installed Atom editor from here: https://atom.io/
Now open up Atom - and search for online and install the apio-IDE package extension to Atom
Make sure you initialise it with your correct path - by doing an echo %path% at the command promt and pasting that path string into the textbox on the package initialiser page.
Atom needs to be restarted for the changes to the path to stick.
The other pitfall I ran into was failing to use apio at the command prompt to install all the tools - as I thought they were already on the system.
At the prompt run apio install --all
This will fetch all of the modules in the toolchain and install them in the correct place.
Atom and apio-IDE should now be working together - and you can start a new project.
For this I went to the examples in the BlackIce repository which you will find here
Each of these example folders contains the files you need to build the binary bitfile - including the verilog code and the Pin Constraint File (pcf) that describes how the pins on the ICE40HX4K device are linked to the hardware.
Once you have got the example folder into the IDE - it's just a case of pressing build - and waiting about 20 seconds - depending on the speed of your naptop.
The toolchain produces a file called hardware.bin and this is what is loaded into the FPGA - in my case I use TeraTerm.
Other things to note is that you should update the firmware to MyStorm Version 0.2 - this allows you to use the USB direct connection to the STM32L433 microcontroller - at full USB speed - for a much faster upload of the code.
Find the new version of the firmware here
To program this in from a windows machine - you have a couple of alternatives:
1 Use the DFUse utility from ST Microelectronics - from here (scroll down to bottom of page to "Get Software")
- Use any Discovery Board or Nucleo board as a ST Link programmer - which is then temporarily connected to the processor pins - that appear on the 26 pin header.
I used method 2, because I had some difficulty with method 1.