Makefile 755 B

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