Skip to content

Commit

Permalink
Merge pull request #39 from mithro/add-conda
Browse files Browse the repository at this point in the history
Adding conda environment + small makefile cleanup.
  • Loading branch information
mithro committed Aug 22, 2017
2 parents c84892e + ae03f73 commit e17fc28
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ version_data.h
version_data.c
docs/html/
docs/latex/
conda
Miniconda3-*.sh
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ sudo: required

install:
- # Install sdcc and as31
- sudo apt-get install --force-yes -y as31 doxygen sdcc
- sudo apt-get install --force-yes -y as31 doxygen
- make conda
- export PATH=$PWD/conda/bin:$PATH
- which sdcc
- sdcc --version

script:
Expand Down
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,38 @@ FX2LIBDIR = ./third_party/fx2lib

TARGETS += fx2

# conda - self contained environment.
export PATH := $(shell pwd)/conda/bin:$(PATH)

Miniconda3-latest-Linux-x86_64.sh:
@echo
@echo " Download conda..."
@echo "-----------------------------"
wget -c https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
@chmod a+x Miniconda3-latest-Linux-x86_64.sh

conda: Miniconda3-latest-Linux-x86_64.sh
@echo
@echo " Setting up conda"
@echo "-----------------------------"
@./Miniconda3-latest-Linux-x86_64.sh -p $@ -b
@conda config --set always_yes yes --set changeps1 no
@conda update -q conda
@conda config --add channels timvideos
@echo
@echo " Install sdcc (compiler)"
@echo "-----------------------------"
@conda install sdcc
@echo
@echo " Install HDMI2USB-mode-switch"
@echo "-----------------------------"
@pip install --upgrade git+https://github.com/timvideos/HDMI2USB-mode-switch.git

conda-clean:
rm -rf conda
rm Miniconda3-*.sh || true

# ???
help-fx2:
@echo " make load-fx2"
@echo " make view"
Expand Down Expand Up @@ -98,6 +130,12 @@ docs:
clean-docs:
rm -fr docs/html docs/latex

# Global
clean: clean-docs clean-fx2 clean-audio-fx2 clean-unconfigured clean-microload
@true

all: conda firmware-fx2 firmware-audio-fx2 microload

# We depend on the .git file inside the directory as git creates an empty dir
# for us.
$(FX2LIBDIR)/.git: .gitmodules
Expand All @@ -106,3 +144,4 @@ $(FX2LIBDIR)/.git: .gitmodules
touch $@ -r .gitmodules

.PHONY: docs clean-docs help-fx2 gateware-fx2 firmware-fx2 load-fx2 clean-fx2 view
.DEFAULT_GOAL := all
3 changes: 3 additions & 0 deletions common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
# https://github.com/timvideos/HDMI2USB-mode-switch
#
# Common rules
MAKEFILE_PATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
export PATH := $(MAKEFILE_PATH)../conda/bin:$(PATH)

LIBS ?= $(FX2LIBDIR)/lib/fx2.lib
INCS += -I sdcc -I$(FX2LIBDIR)/include -I. -I$(COMMON_DIR)/boards

Expand Down
4 changes: 2 additions & 2 deletions microload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ i2c:
cat i2c-prod.hex

clean:
rm microload-i2c-prod.a51
rm *.hex *.lst
rm microload-i2c-prod.a51 || true
rm *.hex *.lst || true

# sdas8051 -l -o -s -p out.ihx microload.a51
# objcopy -I ihex -O binary out.ihx out.hex

0 comments on commit e17fc28

Please sign in to comment.