Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame^] | 1 | # Project config |
| 2 | PROJ=icE1usb |
| 3 | |
| 4 | PROJ_DEPS := no2e1 no2ice40 no2misc no2usb |
| 5 | PROJ_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 | ) |
| 13 | PROJ_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 | ) |
| 25 | PROJ_PREREQ = \ |
| 26 | $(BUILD_TMP)/boot.hex \ |
| 27 | $(NULL) |
| 28 | PROJ_TOP_SRC := rtl/top.v |
| 29 | PROJ_TOP_MOD := top |
| 30 | |
| 31 | # Target config |
| 32 | BOARD ?= ice1usb |
| 33 | DEVICE = up5k |
| 34 | PACKAGE = sg48 |
| 35 | |
| 36 | YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4 |
| 37 | NEXTPNR_ARGS = --pre-pack data/clocks.py --no-promote-globals --seed 2 |
| 38 | |
| 39 | # Include default rules |
| 40 | NO2BUILD_DIR := ../build |
| 41 | include $(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 $< $@ |