Skip to content

Instantly share code, notes, and snippets.

@attie
Last active August 12, 2020 10:05
Show Gist options
  • Save attie/c62c1d215b881e1e5f213cc67687e378 to your computer and use it in GitHub Desktop.
Save attie/c62c1d215b881e1e5f213cc67687e378 to your computer and use it in GitHub Desktop.
Get Started with OrangeCrab r0.2

Orange Crab

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.

nMigen

NOTE: the yosys toolchain must still be on your ${PATH}.

cd OrangeCrab-examples/nmigen

python3 -m venv venv
. venv/bin/activate

pip install --upgrade git+https://github.com/nmigen/nmigen-boards#egg=nmigen-boards

# enter bootloader

python blink.py
@jeremyherbert
Copy link

"getting started with OrangeCrap"... freudian slip maybe? ;)

@attie
Copy link
Author

attie commented Aug 12, 2020

freudian slip maybe? ;)

Whoops! Thanks for pointing that out.

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