Skip to content

Instantly share code, notes, and snippets.

View makestuff's full-sized avatar

Chris McClelland makestuff

View GitHub Profile
@makestuff
makestuff / te630
Created February 11, 2014 16:42
Building 20140111 FPGALink & cksum example for Trenz TE630 LX75
$ cd $HOME
$ rm -rf 3rd/* apps/* libs/* common hdlmake
$ scripts/msget.sh makestuff/hdlmake/20140111
Fetching "makestuff/hdlmake/20140111"...
Uncompressing "makestuff/hdlmake/20140111" into "hdlmake" directory...
Fetching "makestuff/common/20140111"...
Uncompressing "makestuff/common/20140111" into "./common" directory...
$ cd hdlmake/apps/
$ ../bin/hdlmake.py -g makestuff/swled
MakeStuff HDL Builder (C) 2012-2013 Chris McClelland
@makestuff
makestuff / gist:8578853
Created January 23, 2014 14:01
Simulating mem_ctrl
$ cd $HOME
$ mkdir 20131101
$ cd 20131101
$ wget -qO- http://www.swaton.ukfsn.org/bin/makestuff-lindar-20130829.tar.gz | tar zxf -
$ cd makestuff/
$ scripts/msget.sh makestuff/hdlmake/20131101
Fetching "makestuff/hdlmake/20131101"...
Uncompressing "makestuff/hdlmake/20131101" into "hdlmake" directory...
Fetching "makestuff/common/20131101"...
Uncompressing "makestuff/common/20131101" into "./common" directory...
@makestuff
makestuff / python-binding
Created January 17, 2014 21:02
Python binding
$ # Fetch library code & HDL example and build it all...
$ cd $HOME
$ mkdir 20131101
$ cd 20131101/
$ wget -qO- http://www.swaton.ukfsn.org/bin/makestuff-lindar-20130829.tar.gz | tar zxf -
$ cd makestuff
$ scripts/msget.sh makestuff/hdlmake/20131101
Fetching "makestuff/hdlmake/20131101"...
Uncompressing "makestuff/hdlmake/20131101" into "hdlmake" directory...
Fetching "makestuff/common/20131101"...
@makestuff
makestuff / xorg.conf
Created January 10, 2014 14:38
Xorg config for
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 304.116 (pbuilder@cake) Sat Nov 9 14:58:32 UTC 2013
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection

Hello

  • World
  • Blah

Foo bar.

$ mkdir $HOME/20131101
$ cd $HOME/20131101
$ wget -qO- http://www.swaton.ukfsn.org/bin/makestuff-lindar-20130829.tar.gz | tar zxf -
$ cd makestuff
$ scripts/msget.sh makestuff/common/20131101
Fetching "makestuff/common/20131101"...
Uncompressing "makestuff/common/20131101" into "common" directory...
$ cd libs/
$ wget -qO- http://www.swaton.ukfsn.org/temp/libcompetition.tar.gz | tar zxf -
$ cd libcompetition/
@makestuff
makestuff / fpgalink2.py
Last active January 1, 2016 14:29
Python binding matching the libfpgalink/20131101 DLL release
#!/usr/bin/env python
#
# Copyright (C) 2009-2012 Chris McClelland
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@makestuff
makestuff / nexys2-howto
Last active June 10, 2024 17:29
Build FPGALink and the cksum VHDL example, and use flcli to write data to a Nexys2 board, and then read data back from it.
---------------------------------------------------------------------------------------------------
Building FPGALink & the cksum example VHDL for Digilent Nexys2 (1200K) on Linux:
# Install prerequisites:
sudo apt-get install build-essential libreadline-dev libusb-1.0-0-dev python-yaml
mkdir $HOME/20170708
cd $HOME/20170708
wget -qO- http://tiny.cc/msbil | tar zxf -
# Fetch and build flcli:
@makestuff
makestuff / AVR
Created November 19, 2013 17:35
Strange behaviour with programmatic launching of the bootloader with firmware larger than 8KiB.
$ avr-gcc -v
Using built-in specs.
COLLECT_GCC=avr-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/avr/4.5.3/lto-wrapper
Target: avr
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-libssp --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=avr
Thread model: single
gcc version 4.5.3 (GCC)
$
$ # Fetch the code
@makestuff
makestuff / ARMv2
Last active December 28, 2015 14:49
Generating ARMv2 code with a gcc cross-compiler
$ cat regs.c
typedef unsigned int uint32;
#define BLTCON1 *((volatile uint32 *)0xFFFFFF00)
#define BLTCON2 *((volatile uint32 *)0xFFFFFF04)
#define BLTCON3 *((volatile uint32 *)0xFFFFFF08)
void foo(uint32 x, uint32 y, uint32 z) {
BLTCON1 = x;
BLTCON2 = y;