How to write a design into an Arty A7’s flash¶
You have an Arty A7 and a bitstream, and want the design to survive power cycles.
The write changes the on-board SPI flash, so step 1 keeps a copy of the bitstream region first. A load that is only run is on How to load a design onto an Arty A7.
What a correct run prints is waiting for a run: test-designs issue #248.
What you need¶
The Arty A7 joined to the Raspberry Pi by its USB cable (Arty A7 wiring to a Raspberry Pi).
openFPGALoaderon the Raspberry Pi (How to install the Arty A7 packages).A bitstream, a
.bitfile, calleddesign.bitbelow.
Steps¶
On the Raspberry Pi, keep a copy of the bitstream region. On an Arty A7-35T that is the first 2228224 bytes of the flash, which the Arty’s check reads.
ls -l backup.binshows 2228224 bytes. Copybackup.binto your own machine: a netbooted Pi loses it at its next reboot.$ openFPGALoader -b arty --dump-flash --file-size 2228224 backup.bin
On the Raspberry Pi, write the design to the flash and read it back.
$ openFPGALoader -b arty --write-flash --verify design.bit
To put the old bitstream back, run step 2 with backup.bin in place of design.bit.
Check¶
The board appears on the Raspberry Pi as two
/dev/ttyUSB*devices, the JTAG channel and the UART channel.openFPGALoaderends without an error.
If it fails¶
What you see |
Likely cause |
Fix |
|---|---|---|
no |
the Arty’s FTDI is not on USB; a board in that state cannot be programmed or reached on its console |
run |