Add flash make podman target

Use the iceprog in the tkey-builder image to program the SPI flash in
the TKey.
This commit is contained in:
Michael Cardell Widerkrantz 2023-08-30 14:20:41 +02:00 committed by dehanj
parent 7cd085a17e
commit 5f0a9bec9a
No known key found for this signature in database
GPG Key ID: 3707A9DBF4BB8F1A

View File

@ -11,6 +11,7 @@ all:
@echo "run-make Build the FPGA bitstream using image '$(IMAGE)' (Podman)"
@echo "run-make-no-clean Like run-make but without cleaning first, useful for iterative firmware dev"
@echo "run-make-clean_fw Like run-make but cleans only firmware"
@echo "flash Program the SPI flash on the TKey - needs an existing bitstream"
@echo "pull Pull down the image '$(IMAGE)' (Podman)"
@echo "build-image Build a toolchain image named '$(BUILDIMAGE)' (Podman)"
@echo " A newly built image can be used like: make IMAGE=$(BUILDIMAGE) run"
@ -41,6 +42,14 @@ run-make-clean_fw:
podman run --rm --mount type=bind,source="`pwd`/../hw/application_fpga",target=/build -w /build -it \
$(IMAGE) make clean_fw application_fpga.bin
flash:
podman run --rm \
--device /dev/bus/usb/$(lsusb | grep -m 1 1209:8886 | awk '{ printf "%s/%s", $2, substr($4,1,3) }') \
--mount type=bind,source="`pwd`/../hw/application_fpga",target=/build \
-w /build/hw/application_fpga \
-it $(IMAGE) tillitis-iceprog /build/application_fpga.bin
pull:
podman pull $(IMAGE)