Programming the iCE40HX1K-EVB FPGA with a Bus Pirate

Started by valhalla, March 18, 2018, 03:13:04 PM

Previous topic - Next topic

valhalla

Since my OLIMEXINO-32U4 was being used elsewhere, I've tried to program the iCE40HX1K-EVB via SPI using a bus pirate I already had on hand, and apparently it's working slowly but fine.

I've taken notes and did a post on my website: http://www.trueelena.org/computers/howto/programming_the_iCE40HX1K-EVB_fpga__with_a_bus_pirate.html

basically, I've followed the instructions for SPI on the raspberry pi (adapting the device name and speed) with the following wiring:


+------+----+----+--------+
| BP        | ICE40HX1K   |
+======+====+====+========+
| gnd  |  1 |  2 | gnd    |
+------+----+----+--------+
| gnd  |  1 |  6 | creset |
+------+----+----+--------+
| clk  |  7 |  9 | sck    |
+------+----+----+--------+
| mosi |  8 |  8 | sdo    |
+------+----+----+--------+
| cs   |  9 | 10 | ss_b   |
+------+----+----+--------+
| miso | 10 |  7 | sdi    |
+------+----+----+--------+


The command given on the wiki to create a 2M image didn't work for me (it created an image with the wrong size), I had to turn it around a bit as dd if=/dev/zero bs=2M count=1 | tr '\0' '\377' > example.img (the second part, to write the .bin at the beginning of that image did work).