buildpath = build/ filename = uart_test files = top.v pcf_file = io.pcf pdc_file = io.pdc .PHONY: build prog prog_flash clean build_ice40: yosys -p "synth_ice40 -json $(buildpath)$(filename).json -top top" $(files) nextpnr-ice40 --up5k --json $(buildpath)$(filename).json --pcf $(pcf_file) --asc $(buildpath)$(filename).asc icepack $(buildpath)$(filename).asc $(buildpath)$(filename).bin prog_ice40: build #for sram iceprog -S $(buildpath)$(filename).bin prog_flash_ice40: build iceprog $(buildpath)$(filename).bin build_nx: yosys -p "synth_nexus -json $(buildpath)$(filename).json -top top" $(files) nextpnr-nexus --device LIFCL-40-9BG400 --pdc $(pdc_file) --json $(buildpath)$(filename).json --fasm $(buildpath)$(filename).fasm prjoxide pack $(buildpath)$(filename).fasm $(buildpath)$(filename).bit prog_nx: #for sram ecpprog -S $(buildpath)$(filename).bit prog_flash_nx: ecpprog $(buildpath)$(filename).bit clean: rm -rf $(buildpath)/*