Skip to content

Instantly share code, notes, and snippets.

@attie
Created August 11, 2020 20:37
Show Gist options
  • Save attie/5ae500c612770b836e867dcc69fbbb7e to your computer and use it in GitHub Desktop.
Save attie/5ae500c612770b836e867dcc69fbbb7e to your computer and use it in GitHub Desktop.
Get Started with OrangeCrap r0.2

Reference

Get Toolchain

# https://github.com/open-tool-forge/fpga-toolchain/releases

read os <<< "linux"
read arch < <( uname -i )

read url < <(
  curl "https://api.github.com/repos/open-tool-forge/fpga-toolchain/releases/latest" \
    | jq -r \
      --arg os "${os}" \
      --arg arch "${arch}" \
      '.assets[] | select(.name | contains($os + "_" + $arch)) | select(.name | endswith(".tar.gz")) | .browser_download_url'
)

curl -LO "${url}"
tar -xvf "${url##*/}"

export PATH="$(readlink -f fpga-toolchain/bin/):${PATH##*::}"

yosys -V
nextpnr-ecp5 -V

udev Rule

ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5af0", MODE="0666", GROUP="plugdev", TAG+="uaccess"
udevadm control --reload-rules

Examples

git clone https://github.com/gregdavill/OrangeCrab-examples
cd OrangeCrab-examples/verilog/blink
make

Press button, and plug in... LED should fade RGB.

make dfu

Led should fade in/out Orange, and then switch to the new bitstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment