Skip to content

Commit

Permalink
Merge pull request #33 from paddatrapper/travis
Browse files Browse the repository at this point in the history
Setup travis CI
  • Loading branch information
mithro committed Jul 24, 2017
2 parents c3827ed + 55f9b7e commit c2b2d1e
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 67 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: c
sudo: required

install:
- # Add PPA with newer version of sdcc backported to precise
# - sudo apt-add-repository -y ppa:mithro/sdcc-precise
#- sudo apt-get update
- # Install sdcc
- sudo apt-get install --force-yes -y sdcc
- sdcc --version

script:
- make firmware-fx2
73 changes: 63 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,73 @@
# The Cypress FX2 is a programmable USB interface chip found on the Atlys and
# Opsis board (and many other devices out there).
#
# The IC is an 8051 core with a hardware support for the USB protocol. Firmware
# for the FX2 is developed using the fx2lib library and compiled with the SDCC
# compiler.
#
# The firmware can be loaded via USB using a number of tools such as fxload or
# fpgalink. Loading new firmware will cause the FX2 to disconnect and then
# reconnect to the USB bus, often causing it to change USB IDs and device
# files.
#
# Being a programmable device, the FX2 can emulate many other USB devices. We
# use it to emulate a USB UVC Webcam and a USB CDC-ACM serial port.
#

MODESWITCH_CMD = hdmi2usb-mode-switch
FX2LIBDIR = ./third_party/fx2lib

# We depend on the .git file inside the directory as git creates an empty dir
# for us.
$(FX2LIBDIR)/.git: .gitmodules
git submodule sync --recursive -- $$(dirname $@)
git submodule update --recursive --init $$(dirname $@)
touch $@ -r .gitmodules
TARGETS += fx2

# FIXME: Add check_int2jit from hdmi2usb/Makefile
help-fx2:
@echo " make load-fx2"
@echo " make view"

docs: export PROJECT_NUMBER:=$(shell git describe --always --dirty --long)
gateware-generate-fx2:
@true

gateware-build-fx2:
cp gateware/streamer/vhdl/header.hex $(MSCDIR)/build/header.hex

# Firmware for the Cypress FX2
firmware-fx2: hdmi2usb/hdmi2usb.hex
@true

embed-fx2: firmware/lm32/fx2_fw_hdmi2usb.c
@true

load-fx2: hdmi2usb/hdmi2usb.hex
$(MODESWITCH_CMD) --load-fx2-firmware hdmi2usb/hdmi2usb.hex

flash-fx2:
@true

.PHONY: docs clean
clean-fx2:
$(MAKE) -C hdmi2usb clean

hdmi2usb/hdmi2usb.hex:
$(MAKE) -C hdmi2usb

firmware/lm32/fx2_fw_hdmi2usb.c: microload/generate_2nd_stage.py hdmi2usb/hdmi2usb.hex
microload/generate_2nd_stage.py hdmi2usb/hdmi2usb.hex > firmware/lm32/fx2_fw_hdmi2usb.c

# Utility functions
view:
./scripts/view-hdmi2usb.sh

docs: export PROJECT_NUMBER:=$(shell git describe --always --dirty --long)

docs:
doxygen docs/docs.conf

clean:
clean-docs:
rm -fr docs/html docs/latex

# We depend on the .git file inside the directory as git creates an empty dir
# for us.
$(FX2LIBDIR)/.git: .gitmodules
git submodule sync --recursive -- $$(dirname $@)
git submodule update --recursive --init $$(dirname $@)
touch $@ -r .gitmodules

.PHONY: docs clean-docs help-fx2 gateware-fx2 firmware-fx2 load-fx2 clean-fx2 view
57 changes: 0 additions & 57 deletions Makefile.fx2

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# HDMI2USB-fx2-firmware
[![Build Status](https://api.travis-ci.org/timvideos/HDMI2USB-fx2-firmware.svg?branch=master)](https://travis-ci.org/timvideos/HDMI2USB-fx2-firmware)

This repository contains the firmware used in the
[HDMI2USB project](https://hdmi2usb.tv) on the Cypress FX2 chip found on boards
Expand Down

0 comments on commit c2b2d1e

Please sign in to comment.