Skip to content
Tim Ansell edited this page Sep 1, 2018 · 3 revisions

1) Enter the environment

Before being able to run any of the build steps you must first enter the development environment.

Set the type of board you want to use.

export PLATFORM=opsis

Set-up the environment:

cd litex-buildenv
source scripts/enter-env.sh

If your environment is set up correctly your prompt should change to look something like:

(LX P=opsis) #

If your prompt does not change, then check the output to see whether there are any errors.

On failure

You may also find it helpful to rerun the following commands and check those for errors. (These are originally run by the scripts/bootstrap.sh script recommended for use to set up your environment in the previous step.)

Fix any errors reported (including install failures from apt) before continuing.

cd litex-buildenv
sudo scripts/download-env-root.sh
scripts/download-env.sh

2) Build the gateware

Once you have entered the environment, you can build things.

Building the larger gateware (such as the HDMI2USB target) takes roughly between 5 minutes and 15 minutes on a modern fast machine.

make gateware

At the end of running the build command, you should end up with;

Creating bit map...
Saving bit stream in "top.bit".
Saving bit stream in "top.bin".
Bitstream generation is complete.
Firmware 56008 bytes (9528 bytes left)

The built gateware will be in build/opsis_hdmi2usb_lm32/gateware/

3) Configure your board

Before loading onto your board, you need to ensure that your board is in the correct state.


Configuring the Opsis

To use the Opsis, you need to set the jumpers correctly, connect cables correctly and then put the board into JTAG mode.

FIXME: Put something here about the Opsis.

Jumpers Configuration

The jumpers as set on the Opsis when it ships work.

FIXME: Put picture showing correct jumper configuration.

Cables

The programming computer must be connected to the USB-B port.

JTAG mode

By default the Opsis will boot into HDMI2USB mode. To load gateware onto the board it must be switched into JTAG mode.

FIXME: Add instructions for switching the Opsis into JTAG mode.

  • HDMI2USB-mode-switch then run:

    hdmi2usb-mode-switch --mode=jtag
    
  • Connect to console and use fx2 switch command.


Configuring the Atlys

Before loading the gateware you need to set the jumpers correctly and connect the cables correctly.

FIXME: Put something here about the Atlys.

Jumpers Configuration

As the HDMI2USB firmware manipulates the EDID information the following jumpers must be removed;

JP2/SDA (which connects the EDID lines from J1/HDMI IN to JA/HDMI OUT).
JP6 and JP7 (which connects the EDID lines from J3/HDMI IN to J2/HDMI OUT).

Cables

  • Plug board in using PROG port & switch on. If using a VM, ensure the device is passed through.

  • The other UART port is for the controlling the firmware. Recommend plugging :w his in too so you can use/test the device.


4) Loading temporarily

You can load gateware and firmware onto your device temporarily for testing. If you power cycle the device after this step it will go back to the state before this step.

Load the gateware and firmware - see [1] if using a VM:

make gateware-load

On the Opsis, while loading the Blue LED (D1 / Done) and Green LED (D2) will light up. After it has finished, both LED will turn off.

The output will look like this;

jtagspi_program
Info : usb blaster interface using libftdi
Info : This adapter doesn't support configurable speed
Info : JTAG tap: xc6s.tap tap/device found: 0x44028093 (mfg: 0x049 (Xilinx), part: 0x4028, ver: 0x4)
loaded file build/opsis_hdmi2usb-hdmi2usbsoc-opsis.bit to pld device 0 in 31s 983152us

Load fx2 firmware to enable USB capture:

make load-fx2
Clone this wiki locally