Makefile 730 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Project config
  2. PROJ = riscv_usb
  3. PROJ_DEPS := usb misc ice40
  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. ifeq ($(BOOT_CODE),dfu)
  32. YOSYS_READ_ARGS += -DDFU=1
  33. endif
  34. fw/boot.hex:
  35. make -C fw boot.hex
  36. $(BUILD_TMP)/boot.hex: fw/boot.hex
  37. cp $< $@