Makefile 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Project config
  2. PROJ = usb_audio
  3. PROJ_DEPS := no2usb no2misc no2ice40
  4. PROJ_RTL_SRCS := $(addprefix rtl/, \
  5. audio_pcm.v \
  6. dfu_helper.v \
  7. picorv32.v \
  8. picorv32_ice40_regs.v \
  9. soc_bram.v \
  10. soc_picorv32_base.v \
  11. soc_picorv32_bridge.v \
  12. soc_spram.v \
  13. soc_usb.v \
  14. sysmgr.v \
  15. )
  16. PROJ_SIM_SRCS := $(addprefix sim/, \
  17. spiflash.v \
  18. )
  19. PROJ_SIM_SRCS += rtl/top.v
  20. PROJ_TESTBENCHES := \
  21. dfu_helper_tb \
  22. top_tb
  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 := $(shell awk '/^\#\# dev:/{print $$3; exit 1}' data/top-$(BOARD).pcf && echo up5k)
  30. PACKAGE := $(shell awk '/^\#\# pkg:/{print $$3; exit 1}' data/top-$(BOARD).pcf && echo sg48)
  31. YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4 -dsp
  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 $< $@