Makefile 764 B

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