Makefile 719 B

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