# Programming Genesys 2 QSPI (SPI x4) Flash

Following on from the last post, I wanted to program our Genesys 2 board with a .bit file but I hadn't generated a .bin file. The steps are as follows:

1) Generate a bitstream (.bit) file in the normal way.

2) Run this TCL command inside Vivado:

$write_cfgmem -format mcs -interface SPIx4 -size 256 -loadbit "up 0x0 /path/to/bitfile.bit" -file mynewmcs.mcs 3) Open Vivado Lab Edition 4) Open Hardware Manager, open target board ... Read more about Programming Genesys 2 QSPI (SPI x4) Flash # Programming VC707 Virtex 7 BPI Flash The other day, Matt and I were trying to save ourselves the pain of running Vivado Lab Edition every time we wanted to run a new OS image on OpenPiton on our VC707 board. Matt managed to piece together how to program the BPI flash so that we can boot the board from a pre-programmed OpenPiton image. He sent me his steps and I've reproduced them below. I hope this will help others! 1) Generate a bitstream (.bit) file in the normal way. 2) Run this TCL command inside Vivado:$ write_cfgmem -format mcs -...

Read more about Programming VC707 Virtex 7 BPI Flash

# Hex Editing in vim

I've recently spent a fairly significant amount of time messing with hex dumps and object dumps for files related to OS bring-up and assembly tests for OpenPiton. One of the things I felt I was lacking was the ability to hex edit inside of vim. Turns out that you can filter the buffer through xxd which allows you to do just that!

All you need to do is enter:

:%!xxd

And then when you're done, you enter:

:%!xxd -r

Be sure to save after...

Read more about Hex Editing in vim

# Using a Github Repo as a Git Remote

I've had a couple of occasions in the past year or so where I've wanted to make use of a github repo as the reference point for my development but haven't wanted to directly clone and use that repo as the origin. Below I've included the commands I used to set up a local repo which has the github repo as a remote that I can then pull from when there are relevant changes to grab.

We make use of group shared repos so I first set up that repo:

mkdir $repo cd$repo

git init --bare

chmod -R g+swX $repo Edit$repo/config to add...

Read more about Using a Github Repo as a Git Remote