Skip to main content

Programmer for iCEblink40 boards

Project description

Lattice iCEBlink40 Programming Tool

The Lattice iCEBlink40 is a low-cost FPGA board (currently $50 cad) supporting the iCE40 LP/HX families. While the iCEcube programming software on linux supports the chips, it doesn't ship with a port of iceutil.exe to program the board itself. This is an open-source tool, licensed under GPL2, to allow for programming of the FPGA board from linux.

This script has only been tested by the author with the iCEblink40-LP1K board, with the M25P10VP flash. Other users have reported that it works with the HX1K flavour boards.

This tool was created from black-box inspection of the USB datastream between a VM running iceutil and the iCEblink40-LP1K evaluation board. No binary analysis, binary reverse engineering or disassembly was used during the creation of this tool; all information in this file was derived from black-box analysis.

The iCEBlink boards only support programming of the flash memory used to boot the FPGA. Direct SPI programming of the FPGA does not appear to be possible.

Requirements:

  • python 3 or newer
  • pyusb 1.0 or newer

Usage

iCEburn.py

The main flash programming tool is iCEburn.py. It supports two operation flags, -e for erase, and -w for write. The most common usage is:

./iCEburn.py -ew path\_to\_build.bin

regtool.py

Regtool is an example test script to poke at registers via the FPGA data link. The argument

-r 0xAB

will do a read of register 0xAB and print the result to the console. The argument

-w 0xAB:0xCD

will write register 0xAB with value and print the result to the console. With the stock FPGA firmware

./regtool.py -w 5:0x48

will stop the scrolling pattern and fix LED3 on.

Regtool is primarily intended as an example of API usage, and not as a production grade tool.

Bugs

  • If using old versions of pyUSB, you may get an error:

    AttributeError: "'NoneType' object has no attribute 'libusb_exit'"

This is a bug in pyusb.

TODO

  • Add additional flash devices

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iCEburn-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iCEburn-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file iCEburn-0.1.1.tar.gz.

File metadata

  • Download URL: iCEburn-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for iCEburn-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d8ff6e464647e537c9016831af9d723dec7dcfb2f6020e1834a931aad2b49ee7
MD5 e6a7e5a546ad777ec2c9134a5779ca11
BLAKE2b-256 03f381afcf2028a42214bf81740acd5a27ddd3cbbdb4e35cfd2c118c2bb597ab

See more details on using hashes here.

File details

Details for the file iCEburn-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for iCEburn-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8becd8f2dc47b8bce40c619056630e47ecfa6c7d31dccfacafc72d08dbdf362
MD5 219e9af8da992fcf4c11ed5dae9b1156
BLAKE2b-256 6f9d23e12ea26b13aba4fafd2e72b077ed5f813f4598540b058e55d2ead5ff4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page