Skip to content

makefiles: Adding Makefile to quickly test all targets. #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,25 @@ third_party/%/.git: .gitmodules

# Gateware
MODULES=migen misoc liteeth litescope
gateware: $(addprefix gateware-,$(TARGETS)) $(addsuffix /.git,$(addprefix third_party/,$(MODULES)))
gateware-generate: $(addprefix gateware-generate-,$(TARGETS)) $(addsuffix /.git,$(addprefix third_party/,$(MODULES)))
ifneq ($(OS),Windows_NT)
cd $(MSCDIR) && $(CMD) -Ob run False --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream \
| $(FILTER) $(PWD)/build/output.$(DATE).log; (exit $${PIPESTATUS[0]})
else
cd $(MSCDIR) && $(CMD) -Ob run False --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream
endif

gateware-build: $(addprefix gateware-build-,$(TARGETS)) $(addsuffix /.git,$(addprefix third_party/,$(MODULES)))
ifneq ($(OS),Windows_NT)
cd $(MSCDIR) && $(CMD) --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream \
| $(FILTER) $(PWD)/build/output.$(DATE).log; (exit $${PIPESTATUS[0]})
else
cd $(MSCDIR) && $(CMD) --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream
endif

gateware: gateware-generate gateware-build
@true

# Firmware
firmware: $(addprefix firmware-,$(TARGETS))
@true
Expand Down
39 changes: 39 additions & 0 deletions Makefile.all
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

ifneq ($(OS),Windows_NT)
ifneq "$(HDMI2USB_ENV)" "1"
$(error "Please 'source scripts/setup-env.sh'")
endif
endif

# Turn off Python's hash randomization
export PYTHONHASHSEED=0

gateware-generate:
BOARD=atlys TARGET=base make gateware-generate
BOARD=atlys TARGET=hdmi2usb make gateware-generate
BOARD=atlys TARGET=hdmi2eth make gateware-generate
BOARD=opsis TARGET=base make gateware-generate
BOARD=opsis TARGET=hdmi2usb make gateware-generate
BOARD=pipistrello TARGET=base make gateware-generate

gateware-build:
BOARD=atlys TARGET=base make gateware-build
BOARD=atlys TARGET=hdmi2usb make gateware-build
BOARD=atlys TARGET=hdmi2eth make gateware-build
BOARD=opsis TARGET=base make gateware-build
BOARD=opsis TARGET=hdmi2usb make gateware-build
BOARD=pipistrello TARGET=base make gateware-build

firmware:
BOARD=atlys TARGET=base make firmware
BOARD=atlys TARGET=hdmi2usb make firmware
BOARD=atlys TARGET=hdmi2eth make firmware
BOARD=opsis TARGET=base make firmware
BOARD=opsis TARGET=hdmi2usb make firmware
BOARD=pipistrello TARGET=base make firmware

all: firmware gateware
true

.DEFAULT_GOAL := all
.PHONY: all load-gateware load flash gateware firmware third_party/*
5 changes: 4 additions & 1 deletion Makefile.fx2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ help-fx2:
@echo " make load-fx2"
@echo " make view"

gateware-fx2:
gateware-generate-fx2:
@true

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

# Firmware for the Cypress FX2
Expand Down
5 changes: 4 additions & 1 deletion Makefile.lm32
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ help-lm32:
@echo " make connect-lm32"

# The gateware embeds the lm32 firmware, so we need to build that first.
gateware-lm32: firmware-lm32
gateware-generate-lm32:
@true

gateware-build-lm32: firmware-lm32
@true

ifeq ($(TARGET),hdmi2usb)
Expand Down