Initial doc for the orangecrab fpga
authorAndrey Miroshnikov <andrey@technepisteme.xyz>
Thu, 24 Mar 2022 21:05:05 +0000 (21:05 +0000)
committerJacob Lifshay <programmerjake@gmail.com>
Sun, 27 Mar 2022 07:08:34 +0000 (00:08 -0700)
HDL_workflow/orangecrab.mdwn [new file with mode: 0644]

diff --git a/HDL_workflow/orangecrab.mdwn b/HDL_workflow/orangecrab.mdwn
new file mode 100644 (file)
index 0000000..f7de593
--- /dev/null
@@ -0,0 +1,35 @@
+# Orangecrab 0.2 Testing
+
+This page is for documenting the orangecrab bring-up, from blinky to microwatt.
+
+## Further links
+
+* HDL Workflow [[/HDL_workflow]]
+* ECP5 Versa [[/HDL_workflow/ECP5_FPGA]]
+* Microwatt [[/HDL_workflow/microwatt]]
+
+## Requirements
+
+Instructions assumed to be called in a schroot environment.
+
+1. Call nextpcr-ecp5-install
+1. Add environment vars for libtrellis and nextpnr-ecp5 (otherwise building with nmigen-boards will fail).
+    export PATH=/usr/local/libtrellis/bin:/usr/local/nextpnr-ecp5/bin:/usr/lib/ccache:"$PATH"
+1. apt install dfu-util
+1. Add a udev rule for the orangecrab in /etc/udev/rules.d/ . The rule was taken from <https://github.com/orangecrab-fpga/orangecrab-hardware/blob/main/contrib/10-orangecrab.rules>.
+    ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5af0", MODE="0666", GROUP="plugdev", TAG+="uaccess"
+1. Git clone "nmigen-boards" from gitlab <https://gitlab.com/nmigen/nmigen-boards>
+1. cd into "nmigen-boards" and install by calling:
+    python3 setup.py develop
+
+## Setting orangecrab into DFU
+
+1. Press and hold the button on the orangecrab.
+1. Plug in the usb cable.
+1. Calling the following should show two devices: one is the RISCV firmware bootloader, the other is the user bitstream.
+
+## Build and upload "blinky"
+1. cd into "nmigen-boards/nmigen-boards".
+1. Build and program the board: 
+    python3 -m nmigen_boards.orangecrab_r0_2
+1. You should now have a *very* bright LED flashing!