Skip to content

Commit 2a7b47d

Browse files
committed
Merge pull request #173 from mithro/makefile-all
makefiles: Adding Makefile to quickly test all targets.
2 parents a5ff108 + 43ef247 commit 2a7b47d

File tree

4 files changed

+59
-3
lines changed

4 files changed

+59
-3
lines changed

Makefile

+12-1
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,25 @@ third_party/%/.git: .gitmodules
7676

7777
# Gateware
7878
MODULES=migen misoc liteeth litescope
79-
gateware: $(addprefix gateware-,$(TARGETS)) $(addsuffix /.git,$(addprefix third_party/,$(MODULES)))
79+
gateware-generate: $(addprefix gateware-generate-,$(TARGETS)) $(addsuffix /.git,$(addprefix third_party/,$(MODULES)))
80+
ifneq ($(OS),Windows_NT)
81+
cd $(MSCDIR) && $(CMD) -Ob run False --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream \
82+
| $(FILTER) $(PWD)/build/output.$(DATE).log; (exit $${PIPESTATUS[0]})
83+
else
84+
cd $(MSCDIR) && $(CMD) -Ob run False --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream
85+
endif
86+
87+
gateware-build: $(addprefix gateware-build-,$(TARGETS)) $(addsuffix /.git,$(addprefix third_party/,$(MODULES)))
8088
ifneq ($(OS),Windows_NT)
8189
cd $(MSCDIR) && $(CMD) --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream \
8290
| $(FILTER) $(PWD)/build/output.$(DATE).log; (exit $${PIPESTATUS[0]})
8391
else
8492
cd $(MSCDIR) && $(CMD) --csr_csv $(HDMI2USBDIR)/test/csr.csv build-csr-csv build-bitstream
8593
endif
8694

95+
gateware: gateware-generate gateware-build
96+
@true
97+
8798
# Firmware
8899
firmware: $(addprefix firmware-,$(TARGETS))
89100
@true

Makefile.all

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
ifneq ($(OS),Windows_NT)
3+
ifneq "$(HDMI2USB_ENV)" "1"
4+
$(error "Please 'source scripts/setup-env.sh'")
5+
endif
6+
endif
7+
8+
# Turn off Python's hash randomization
9+
export PYTHONHASHSEED=0
10+
11+
gateware-generate:
12+
BOARD=atlys TARGET=base make gateware-generate
13+
BOARD=atlys TARGET=hdmi2usb make gateware-generate
14+
BOARD=atlys TARGET=hdmi2eth make gateware-generate
15+
BOARD=opsis TARGET=base make gateware-generate
16+
BOARD=opsis TARGET=hdmi2usb make gateware-generate
17+
BOARD=pipistrello TARGET=base make gateware-generate
18+
19+
gateware-build:
20+
BOARD=atlys TARGET=base make gateware-build
21+
BOARD=atlys TARGET=hdmi2usb make gateware-build
22+
BOARD=atlys TARGET=hdmi2eth make gateware-build
23+
BOARD=opsis TARGET=base make gateware-build
24+
BOARD=opsis TARGET=hdmi2usb make gateware-build
25+
BOARD=pipistrello TARGET=base make gateware-build
26+
27+
firmware:
28+
BOARD=atlys TARGET=base make firmware
29+
BOARD=atlys TARGET=hdmi2usb make firmware
30+
BOARD=atlys TARGET=hdmi2eth make firmware
31+
BOARD=opsis TARGET=base make firmware
32+
BOARD=opsis TARGET=hdmi2usb make firmware
33+
BOARD=pipistrello TARGET=base make firmware
34+
35+
all: firmware gateware
36+
true
37+
38+
.DEFAULT_GOAL := all
39+
.PHONY: all load-gateware load flash gateware firmware third_party/*

Makefile.fx2

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ help-fx2:
2020
@echo " make load-fx2"
2121
@echo " make view"
2222

23-
gateware-fx2:
23+
gateware-generate-fx2:
24+
@true
25+
26+
gateware-build-fx2:
2427
cp gateware/encoder/vhdl/header.hex $(MSCDIR)/build/header.hex
2528

2629
# Firmware for the Cypress FX2

Makefile.lm32

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ help-lm32:
3232
@echo " make connect-lm32"
3333

3434
# The gateware embeds the lm32 firmware, so we need to build that first.
35-
gateware-lm32: firmware-lm32
35+
gateware-generate-lm32:
36+
@true
37+
38+
gateware-build-lm32: firmware-lm32
3639
@true
3740

3841
ifeq ($(TARGET),hdmi2usb)

0 commit comments

Comments
 (0)