This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can build the FX2 firmware on Linux like this: | |
chris@deb8$ cd $HOME | |
chris@deb8$ mkdir -p 20150807 | |
chris@deb8$ cd 20150807 | |
chris@deb8$ wget --no-check-certificate -qO- http://tiny.cc/msbil | tar zxf - | |
chris@deb8$ cd makestuff/libs | |
chris@deb8$ ../scripts/msget.sh makestuff/libfpgalink/20150807 | |
: | |
chris@deb8$ cd libfpgalink/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <makestuff.h> | |
#include <liberror.h> | |
#include <wiringPi.h> | |
#include "parser.h" | |
typedef enum { | |
TCK = 7, | |
TDO = 0, | |
TDI = 9, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from scipy import interpolate | |
import random | |
size = 16 | |
margin = 1000 | |
foo = 512 | |
x = [i*4 for i in range(0, size+1)] | |
y = [i*4 for i in range(0, 4)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
static inline int do_loop(unsigned long i, unsigned long end) { | |
return (i < end) ? printf("loop %lu\n", i), do_loop(i+1, end) : 0; | |
} | |
int main(int argc, char *argv[]) { | |
return do_loop(0, strtoul(argv[1], NULL, 10)); | |
(void)argc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# BUILD TOOLS & XSVF FILES | |
sudo apt-get update | |
sudo apt-get install build-essential libreadline-dev libusb-1.0-0-dev python-yaml | |
export XILINX=/opt/Xilinx/14.7/ISE_DS/ISE | |
export PATH=${XILINX}/bin/lin64:${PATH} | |
cd $HOME | |
mkdir 20150315 | |
mkdir umdkv2-bin | |
cd 20150315 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------------------------------- | |
Building FPGALink & the readback example VHDL for MakeStuff LX9R3 on Linux: | |
# Install prerequisites: | |
sudo apt-get install build-essential libreadline-dev libusb-1.0-0-dev python-yaml | |
mkdir $HOME/20140524 | |
cd $HOME/20140524 | |
wget -qO- http://tiny.cc/msbil | tar zxf - | |
# Fetch and build flcli: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Can optionally start at pomodoro N on a given day (if I need to reboot, etc). | |
if [ $# -eq 0 ]; then | |
printf "\nBeginning workday $(date +%Y-%m-%d)...\n" >> ${HOME}/pom.log | |
POM=1 | |
elif [ $# -eq 1 ]; then | |
POM=$1 | |
else | |
echo "Synopsis: pom.sh [<pom-start>]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build host-side server program | |
sudo apt-get install build-essential libusb-1.0-0-dev | |
mkdir $HOME/20140120 | |
cd $HOME/20140120 | |
wget -qO- http://tiny.cc/msbil | tar zxf - | |
cd makestuff/apps | |
../scripts/msget.sh makestuff/udfs/20140120 | |
cd udfs/server/ | |
make deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------------------------------- | |
Building FPGALink & the cksum example VHDL for Aessent aes220 on Linux: | |
# Install prerequisites: | |
sudo apt-get install build-essential libreadline-dev libusb-1.0-0-dev python-yaml | |
mkdir $HOME/20140524 | |
cd $HOME/20140524 | |
wget -qO- http://tiny.cc/msbil | tar zxf - | |
# Fetch and build flcli: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read the ID of the attached SPI flash | |
flcli -v 1d50:602b -c 1 -a 'w1 00;w1 04;w0 9F000000;w1 00;r0 4' | |
FF 20 20 13 | |
# Generate .rbf file and write it to flash (note byte-swap) | |
quartus_cpf -c top_level.sof top_level.rbf | |
gordon -v 1d50:602b -t indirect:1 -w top_level.rbf:0 -s |