From c71db50a27600885ea4e84d9744a4a4417af02c6 Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 17 Nov 2017 11:27:40 +0000 Subject: Add UltraPlus LED driver support and demo --- examples/up5k_rgb/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 examples/up5k_rgb/Makefile (limited to 'examples/up5k_rgb/Makefile') diff --git a/examples/up5k_rgb/Makefile b/examples/up5k_rgb/Makefile new file mode 100644 index 0000000..711ce5a --- /dev/null +++ b/examples/up5k_rgb/Makefile @@ -0,0 +1,36 @@ +PROJ = rgb +PIN_DEF = rgb.pcf +DEVICE = up5k +# Relative paths for easier development without messing with installed version +ARACHNE = ../../../arachne-pnr/bin/arachne-pnr +ARACHNE_ARGS = -c ../../icebox/chipdb-5k.txt +ICEPACK = ../../icepack/icepack +ICETIME = ../../icetime/icetime +ICEPROG = ../../iceprog/iceprog + +all: $(PROJ).bin + +%.blif: %.v + yosys -p 'synth_ice40 -top top -blif $@' $< + +%.asc: $(PIN_DEF) %.blif + $(ARACHNE) $(ARACHNE_ARGS) -d $(subst up,,$(subst hx,,$(subst lp,,$(DEVICE)))) -o $@ -p $^ + +%.bin: %.asc + $(ICEPACK) $< $@ + +%.rpt: %.asc + $(ICETIME) -d $(DEVICE) -mtr $@ $< + +prog: $(PROJ).bin + $(ICEPROG) -S $< + +sudo-prog: $(PROJ).bin + @echo 'Executing prog as root!!!' + sudo $(ICEPROG) -S $< + +clean: + rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin + +.SECONDARY: +.PHONY: all prog clean -- cgit v1.2.3 From 9184fbdf404c0e94326919c92a27d3292994cdf1 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 20 Nov 2017 09:51:03 +0000 Subject: Tidy up 5k examples --- examples/up5k_rgb/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/up5k_rgb/Makefile') diff --git a/examples/up5k_rgb/Makefile b/examples/up5k_rgb/Makefile index 711ce5a..51c1f72 100644 --- a/examples/up5k_rgb/Makefile +++ b/examples/up5k_rgb/Makefile @@ -1,12 +1,12 @@ PROJ = rgb PIN_DEF = rgb.pcf DEVICE = up5k -# Relative paths for easier development without messing with installed version -ARACHNE = ../../../arachne-pnr/bin/arachne-pnr -ARACHNE_ARGS = -c ../../icebox/chipdb-5k.txt -ICEPACK = ../../icepack/icepack -ICETIME = ../../icetime/icetime -ICEPROG = ../../iceprog/iceprog + +ARACHNE = arachne-pnr +ARACHNE_ARGS = +ICEPACK = icepack +ICETIME = icetime +ICEPROG = iceprog all: $(PROJ).bin -- cgit v1.2.3