How to re-flash the Arty board?
The Xilinx recommended way to re-flash the Arty board is to use the Vivado Design Studio, a huge, Windows-only commercial application.
For those in the synthesised hardware business, this might be a perfectly acceptable solution.
For the rest of us, installing a Windows virtual machine and huge (tens of GB) applications only to re-flash a development board is a bit too much.
A simpler solution is to use the open source xc3sprog program.
How to build
On GNU/Linux, building
$ svn http://xc3sprog.svn.sourceforge.net/svnroot/xc3sprog/trunk xc3sprog.svn $ mkdir build $ cd build $ cmake ../xc3sprog.svn $ make $ make install
On macOS, the following Homebrew packages are required to build
You can then build using the steps described for GNU/Linux.
How to use
The Arty board has a FTDI interface to program the Xlinx FPGA, but the SPI flash is not directly accessible by FTDI, so it requires a special image inside Xlinx to make the connections to the SPI flash.
Given this configuration, the Arty re-flashing is done in two steps:
- the first step uses
xc3sprogto program Xlinx to obtain access to the SPI flash
- the second step uses
openocdto program the main
.mcsimage into the SPI flash
$ xc3sprog -c nexys4 E31_ArtyTop.bit $ cd freedom-e-sdk $ openocd -f bsp/env/coreplexip-e31-arty/openocd.cfg \ -c "flash protect 0 0 last off" \ -c "program coreplexip_e31_arty/arty.E31FPGAEvaluationConfig.mcs verify 0x40000000" \ -c "exit"
TODO: explain where to get the E31_ArtyTop.bit file from.