Makefile 820 B

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