Skip to content

Instantly share code, notes, and snippets.

@alg0trader
Created January 12, 2020 06:02
Show Gist options
  • Save alg0trader/958c2469ab1e062bfb3f4f1d5b4dc6a1 to your computer and use it in GitHub Desktop.
Save alg0trader/958c2469ab1e062bfb3f4f1d5b4dc6a1 to your computer and use it in GitHub Desktop.
# bloop targets
ifneq ($(PLATFORM),bloop)
$(error "Platform should be bloop when using this file!?")
endif
# Settings
DEFAULT_TARGET = bloop_dev_ecp5
COMM_PORT ?= /dev/ttyUSB0
TARGET ?= $(DEFAULT_TARGET)
BAUD ?= 115200
# Image
image-flash-$(PLATFORM):
@echo "bloop doesn't support loading, use the flash target instead."
@echo "make gateware-flash"
@false
# Gateware
gateware-load-$(PLATFORM):
openocd -f /usr/share/trellis/misc/openocd/ecp5-evn.cfg -c "transport select jtag; init; $(TARGET_BUILD_DIR)/gateware/top.svf; exit"
gateware-flash-$(PLATFORM): $(GATEWARE_BIOS_FILE)
iceprog $(GATEWARE_BIOS_FILE)
# Firmware
firmware-load-$(PLATFORM):
@echo "Unsupported."
@false
firmware-flash-$(PLATFORM):
@echo "bloop doesn't support just flashing firmware, use image target instead."
@echo "make image-flash"
@false
firmware-connect-$(PLATFORM):
flterm --port=$(COMM_PORT) --speed=$(BAUD)
firmware-clear-$(PLATFORM):
@echo "FIXME: Unsupported?."
@false
# Bios
bios-flash-$(PLATFORM):
@echo "Unsupported."
@false
# Extra commands
help-$(PLATFORM):
@true
reset-$(PLATFORM):
@echo "Unsupported."
@false
@alg0trader
Copy link
Author

Makefile created for bloop platform (ECP5 FPGA).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment