Makefile 776 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Project config
  2. PROJ = riscv_usb
  3. PROJ_DEPS := no2misc no2ice40
  4. PROJ_RTL_SRCS := $(addprefix rtl/, \
  5. dfu_helper.v \
  6. picorv32.v \
  7. picorv32_ice40_regs.v \
  8. soc_bram.v \
  9. soc_picorv32_base.v \
  10. soc_picorv32_bridge.v \
  11. soc_spram.v \
  12. sysmgr.v \
  13. 3signal.v \
  14. button.v \
  15. mailbox_wb.v \
  16. )
  17. PROJ_SIM_SRCS := $(addprefix sim/, \
  18. spiflash.v \
  19. )
  20. PROJ_SIM_SRCS += rtl/top.v
  21. PROJ_TESTBENCHES := \
  22. dfu_helper_tb \
  23. top_tb
  24. PROJ_PREREQ = \
  25. $(BUILD_TMP)/boot.hex
  26. PROJ_TOP_SRC := rtl/top.v
  27. PROJ_TOP_MOD := top
  28. # Target config
  29. BOARD ?= icebreaker
  30. DEVICE = up5k
  31. PACKAGE = sg48
  32. NEXTPNR_ARGS = --pre-pack data/clocks.py --seed 2
  33. # Include default rules
  34. include ../../build/project-rules.mk
  35. # Custom rules
  36. fw/boot.hex:
  37. make -C fw boot.hex
  38. $(BUILD_TMP)/boot.hex: fw/boot.hex
  39. cp $< $@