diff --git a/Makefile b/Makefile index 4ba3a9bd..f8ec4152 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,15 @@ 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]}) @@ -84,6 +92,9 @@ 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 diff --git a/Makefile.all b/Makefile.all new file mode 100644 index 00000000..cb93e160 --- /dev/null +++ b/Makefile.all @@ -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/* diff --git a/Makefile.fx2 b/Makefile.fx2 index 384043a6..322490fd 100644 --- a/Makefile.fx2 +++ b/Makefile.fx2 @@ -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 diff --git a/Makefile.lm32 b/Makefile.lm32 index 4c1cafdb..2424f4ba 100644 --- a/Makefile.lm32 +++ b/Makefile.lm32 @@ -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)