Sylvain Munaut | da65157 | 2020-09-14 10:10:49 +0200 | [diff] [blame] | 1 | # Project config |
| 2 | PROJ=icE1usb-proto |
| 3 | |
| 4 | PROJ_DEPS := no2e1 no2ice40 no2misc no2usb |
| 5 | PROJ_RTL_SRCS := $(addprefix rtl/, \ |
| 6 | misc.v \ |
| 7 | sysmgr.v \ |
| 8 | ) |
| 9 | PROJ_RTL_SRCS += $(addprefix ../common/rtl/, \ |
Sylvain Munaut | ff0ab3e | 2020-10-03 20:15:28 +0200 | [diff] [blame] | 10 | capcnt.v \ |
| 11 | capcnt_sb_mac16.v \ |
Sylvain Munaut | da65157 | 2020-09-14 10:10:49 +0200 | [diff] [blame] | 12 | dfu_helper.v \ |
| 13 | picorv32.v \ |
Sylvain Munaut | c75f71e | 2020-10-03 20:01:58 +0200 | [diff] [blame] | 14 | picorv32_ice40_regs.v \ |
Sylvain Munaut | da65157 | 2020-09-14 10:10:49 +0200 | [diff] [blame] | 15 | soc_base.v \ |
| 16 | soc_bram.v \ |
| 17 | soc_iobuf.v \ |
| 18 | soc_picorv32_bridge.v \ |
| 19 | soc_spram.v \ |
| 20 | wb_arbiter.v \ |
| 21 | wb_dma.v \ |
| 22 | wb_epbuf.v \ |
| 23 | ) |
| 24 | PROJ_PREREQ = \ |
| 25 | $(BUILD_TMP)/boot.hex \ |
| 26 | $(NULL) |
| 27 | PROJ_TOP_SRC := rtl/top.v |
| 28 | PROJ_TOP_MOD := top |
| 29 | |
| 30 | # Target config |
| 31 | BOARD ?= icebreaker |
Sylvain Munaut | 0f29d6a | 2020-10-09 13:22:58 +0200 | [diff] [blame] | 32 | DEVICE := up5k |
| 33 | PACKAGE := sg48 |
Sylvain Munaut | da65157 | 2020-09-14 10:10:49 +0200 | [diff] [blame] | 34 | |
Sylvain Munaut | 0f29d6a | 2020-10-09 13:22:58 +0200 | [diff] [blame] | 35 | SEED ?= 4 |
| 36 | NEXTPNR_ARGS := --no-promote-globals --pre-pack data/clocks.py --seed $(SEED) |
| 37 | |
| 38 | ifeq ($(IGNORE_TIMING),1) |
| 39 | NEXTPNR_ARGS += --timing-allow-fail |
| 40 | endif |
Sylvain Munaut | da65157 | 2020-09-14 10:10:49 +0200 | [diff] [blame] | 41 | |
| 42 | # Include default rules |
Sylvain Munaut | 84717d6 | 2020-10-03 20:18:00 +0200 | [diff] [blame] | 43 | NO2BUILD_DIR ?= ../build |
Sylvain Munaut | da65157 | 2020-09-14 10:10:49 +0200 | [diff] [blame] | 44 | include $(NO2BUILD_DIR)/project-rules.mk |
| 45 | |
| 46 | # Custom rules |
| 47 | ../common/fw/boot.hex: |
| 48 | make -C ../common/fw boot.hex |
| 49 | |
| 50 | $(BUILD_TMP)/boot.hex: ../common/fw/boot.hex |
| 51 | cp $< $@ |