Makefile 681 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Project config
  2. PROJ = riscv_usb
  3. PROJ_DEPS := no2usb no2misc no2ice40
  4. PROJ_RTL_SRCS := $(addprefix rtl/, \
  5. bridge.v \
  6. dfu_helper.v \
  7. picorv32.v \
  8. soc_bram.v \
  9. soc_spram.v \
  10. sysmgr.v \
  11. )
  12. PROJ_SIM_SRCS := $(addprefix sim/, \
  13. spiflash.v \
  14. )
  15. PROJ_SIM_SRCS += rtl/top.v
  16. PROJ_TESTBENCHES := \
  17. dfu_helper_tb \
  18. top_tb
  19. PROJ_PREREQ = \
  20. $(BUILD_TMP)/boot.hex
  21. PROJ_TOP_SRC := rtl/top.v
  22. PROJ_TOP_MOD := top
  23. # Target config
  24. BOARD ?= icebreaker
  25. DEVICE = up5k
  26. PACKAGE = sg48
  27. NEXTPNR_ARGS = --pre-pack data/clocks.py --seed 2
  28. # Include default rules
  29. include ../../build/project-rules.mk
  30. # Custom rules
  31. fw/boot.hex:
  32. make -C fw boot.hex
  33. $(BUILD_TMP)/boot.hex: fw/boot.hex
  34. cp $< $@