Skip to content

Commit

Permalink
tinyfpga_bx: Enable not specifying PROG_PORT.
Browse files Browse the repository at this point in the history
tinyprog can auto-find the tinyfpga_bx if PROG_PORT is not specified.
  • Loading branch information
mithro committed Aug 8, 2019
1 parent 4385477 commit 5e89547
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions targets/tinyfpga_bx/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,18 @@ endif
DEFAULT_TARGET = base
TARGET ?= $(DEFAULT_TARGET)
BAUD ?= 115200
PROG_PORT ?= $(PROG_PORT)
COMM_PORT ?= /dev/ttyACM0

ifneq ($(PROG_PORT),)
PROG_EXTRA_ARGS=-c $(PROG_PORT)
else
PROG_EXTRA_ARGS=
endif

# Image
image-flash-$(PLATFORM):
tinyprog --program-image $(IMAGE_FILE) -c $(PROG_PORT)
tinyprog $(PROG_EXTRA_ARGS) --program-image $(IMAGE_FILE)

# Gateware
gateware-load-$(PLATFORM):
Expand All @@ -24,7 +32,7 @@ gateware-load-$(PLATFORM):
GATEWARE_BIOS_FILE = $(TARGET_BUILD_DIR)/image-gateware+bios+none.bin

gateware-flash-$(PLATFORM): $(GATEWARE_BIOS_FILE)
tinyprog --program-image $(GATEWARE_BIOS_FILE) -c $(PROG_PORT)
tinyprog $(PROG_EXTRA_ARGS) --program-image $(GATEWARE_BIOS_FILE)

# To avoid duplicating the mkimage.py call here, if the user has not
# already built a image-gateware+bios+none.bin, we call make recursively
Expand Down

0 comments on commit 5e89547

Please sign in to comment.