blob: 96a5c4791ecc65d4314e95e9ae170250dfab5512 [file] [log] [blame]
Sylvain Munautbd83e532020-09-15 22:11:29 +02001# Project config
2PROJ=icE1usb
3
4PROJ_DEPS := no2e1 no2ice40 no2misc no2usb
5PROJ_RTL_SRCS := $(addprefix rtl/, \
6 i2c_master.v \
7 i2c_master_wb.v \
8 led_blinker.v \
9 misc.v \
10 sr_btn_if.v \
11 sysmgr.v \
12)
13PROJ_RTL_SRCS += $(addprefix ../common/rtl/, \
14 dfu_helper.v \
15 picorv32.v \
16 soc_base.v \
17 soc_bram.v \
18 soc_iobuf.v \
19 soc_picorv32_bridge.v \
20 soc_spram.v \
21 wb_arbiter.v \
22 wb_dma.v \
23 wb_epbuf.v \
24)
25PROJ_PREREQ = \
26 $(BUILD_TMP)/boot.hex \
27 $(NULL)
28PROJ_TOP_SRC := rtl/top.v
29PROJ_TOP_MOD := top
30
31# Target config
32BOARD ?= ice1usb
33DEVICE = up5k
34PACKAGE = sg48
35
36YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4
37NEXTPNR_ARGS = --pre-pack data/clocks.py --no-promote-globals --seed 2
38
39# Include default rules
40NO2BUILD_DIR := ../build
41include $(NO2BUILD_DIR)/project-rules.mk
42
43# Custom rules
44../common/fw/boot.hex:
45 make -C ../common/fw boot.hex
46
47$(BUILD_TMP)/boot.hex: ../common/fw/boot.hex
48 cp $< $@