Makefile 773 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Project config
  2. PROJ = usb_amr
  3. PROJ_DEPS := no2usb no2misc no2ice40
  4. PROJ_RTL_SRCS := $(addprefix rtl/, \
  5. mc97.v \
  6. mc97_fifo.v \
  7. mc97_rfi.v \
  8. mc97_wb.v \
  9. dfu_helper.v \
  10. picorv32.v \
  11. picorv32_ice40_regs.v \
  12. soc_bram.v \
  13. soc_picorv32_base.v \
  14. soc_picorv32_bridge.v \
  15. soc_spram.v \
  16. soc_usb.v \
  17. sysmgr.v \
  18. )
  19. PROJ_TESTBENCHES := \
  20. mc97_tb \
  21. mc97_rfi_tb \
  22. $(NULL)
  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. YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4
  32. NEXTPNR_ARGS = --pre-pack data/clocks.py --seed 2
  33. # Include default rules
  34. include ../../build/project-rules.mk
  35. # Custom rules
  36. fw/boot.hex:
  37. make -C fw boot.hex
  38. $(BUILD_TMP)/boot.hex: fw/boot.hex
  39. cp $< $@