Bug 1244: changes to pospopcnt
[libreriscv.git] / HDL_workflow / orangecrab.mdwn
1 # Orangecrab 0.2 Testing
2
3 This page is for documenting the orangecrab bring-up, from blinky to microwatt.
4
5 ## Further links
6
7 * HDL Workflow [[/HDL_workflow]]
8 * ECP5 Versa [[/HDL_workflow/ECP5_FPGA]]
9 * Microwatt [[/HDL_workflow/microwatt]]
10 * <https://hackaday.io/project/168594-feather-wing-pmod-adapter>
11
12 ## Requirements
13
14 Instructions assumed to be called in a schroot environment.
15
16 1. Call nextpcr-ecp5-install
17 1. Add environment vars for libtrellis and nextpnr-ecp5 (otherwise building with nmigen-boards will fail).
18 export PATH=/usr/local/libtrellis/bin:/usr/local/nextpnr-ecp5/bin:/usr/lib/ccache:"$PATH"
19 1. apt install dfu-util
20 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>.
21 ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5af0", MODE="0666", GROUP="plugdev", TAG+="uaccess"
22 1. Git clone "nmigen-boards" from gitlab <https://gitlab.com/nmigen/nmigen-boards>
23 1. cd into "nmigen-boards" and install by calling:
24 python3 setup.py develop
25
26 ## Setting orangecrab into DFU
27
28 1. Press and hold the button on the orangecrab.
29 1. Plug in the usb cable.
30 1. Calling the following should show two devices: one is the RISCV firmware bootloader, the other is the user bitstream.
31
32 ## Build and upload "blinky"
33 1. cd into "nmigen-boards/nmigen-boards".
34 1. Build and program the board:
35 python3 -m nmigen_boards.orangecrab_r0_2
36 1. You should now have a *very* bright LED flashing!