Makefile 806 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_sw2rtl.v \
  16. mailbox_wb_rtl2sw.v \
  17. )
  18. PROJ_SIM_SRCS := $(addprefix sim/, \
  19. spiflash.v \
  20. )
  21. PROJ_SIM_SRCS += rtl/top.v
  22. PROJ_TESTBENCHES := \
  23. dfu_helper_tb \
  24. top_tb
  25. PROJ_PREREQ = \
  26. $(BUILD_TMP)/boot.hex
  27. PROJ_TOP_SRC := rtl/top.v
  28. PROJ_TOP_MOD := top
  29. # Target config
  30. BOARD ?= icebreaker
  31. DEVICE = up5k
  32. PACKAGE = sg48
  33. NEXTPNR_ARGS = --pre-pack data/clocks.py --seed 2
  34. # Include default rules
  35. include ../../build/project-rules.mk
  36. # Custom rules
  37. fw/boot.hex:
  38. make -C fw boot.hex
  39. $(BUILD_TMP)/boot.hex: fw/boot.hex
  40. cp $< $@