Newer
Older
filename = top
pcf_file = io.pcf
build:
yosys -qp "synth_ice40 -json $(filename).json" $(filename).v
nextpnr-ice40 -q\
--up5k \
--package sg48 \
--json $(filename).json \
--pcf $(pcf_file) \
--asc $(filename).asc
icepack $(filename).asc $(filename).bin
#prog: #for sram
#iceprog -S $(filename).bin
#prog_flash:
# @if [ -d '$(ICELINK_DIR)' ]; \
# then \
# cp $(filename).bin $(ICELINK_DIR); \
# else \
# echo "iCELink not found"; \
# exit 1; \
# fi
flash: build
~/projects/icesugar/tools/icesprog.x64.linux $(filename).bin
clean:
rm -rf $(filename).blif $(filename).asc $(filename).bin