Skip to content

Firmware

Tim Ansell edited this page Jun 4, 2013 · 29 revisions

There are multiple ways to program the board; select from the below;

  • I just want to use the device - Entirely Open Source
  • I just want to use the device - Digilent Tools
  • I'm using the Xilinx development environment

The HDMI2USB device has two different firmware, one for the FPGA and one for the Cypress FPGA chip.

Firmware Diagram

General Process

  • Step 0 - Connect up and power on the Digilent board
  • Step 1 - Flash the Cypress FX2 chip with firmware suitable for flashing the FPGA1
  • Step 2 - Flash the Xilinx Spartan-6 FPGA with HDMI2USB firmware
  • Step 3 - Flash the Cypress FX2 chip with HDMI2USB firmware (nothing changes until you complete the following steps
  • Step 4 - Pull USB plug out of the computer, plug the USB plug back into the computer, the HDMI2USB device should appear.

1: This step is not needed if using the Digilent tools.

I just want to use the device - Digilent Tools

To use this method you must have the Adept 2.XX.XX Utilities installed and Adept 2.XX.XX Runtime installed.

Stage 1 - Program the Xilinx FPGA chip

  • Step 1 - Plug the power from your power pack into the POWER port.
  • Step 2 - Plug the micro-USB cable from your computer into the PROG port.
  • Step 3 - Run djtgcfg enum, output should be as follows;
$ djtgcfg enum
No devices found
$
$ djtgcfg enum
Found 1 device(s)

Device: Atlys
    Product Name:   Atlys
    User Name:      Atlys
    Serial Number:  210178440327
$
$ djtgcfg init -d Atlys
Initializing scan chain...
Found Device ID: 44008093

Found 1 device(s):
    Device 0: XC6SLX45
$ djtgcfg prog -d Atlys -i 0 -f hdmi2usb.bit 
Programming device. Do not touch your board. This may take a few minutes...
Programming succeeded.
$
  • Step 8 - The DONE light near the red RESET button should light up.

You have now completed Stage 1 - continue to Stage 2 to program the Cypress FX2 chip.

Stage 2 - Programming the Cypress FX2 chip.

libusb fxload comes from https://github.com/pbatard/fxload

./fxload -vvv -t fx2 -D 1443:0007 -I uvc_bulk.hex

Note: the fxload version that ships with Ubuntu, Debian and possibly other Linux distributions (0.0.20081013-1) does not support the -D syntax as above.

You should also be able to use http://www.makestuff.eu/wordpress/software/fx2tools/

./fx2loader --vidpid=1443:0007 uvc.hex ram

Once programmed, you'll need to unplug the USB and plug it back in for the computer to see the new UVC camera device.

!!!WARNING!!! - Only program to RAM. Programming to Flash/EEPROM will cause you to lose the ability to program to the FPGA permanently!

Once you program the Cypress Firmware you will be unable to program the FPGA without a power cycle.

1 - You are programming the FX2 chip which runs the PROG port on the board. This means that you won't be able to reprogram the FPGA until power-cycle the FPGA board.

Xilinx Spartan FPGA Firmware

Use impact to program the hdmi2usb_onboard.bit device to the FPGA.

Impact must be installed, along with the Digilent ADEPT tools. To avoid having to use the Impact GUI, the following script can be used https://gist.github.com/shenki/5387626

impact -batch download.cmd

Cypress USB Chip Firmware