diff --git a/boards/openmote-b/Makefile.include b/boards/openmote-b/Makefile.include index f72a87e3fd..95547fc254 100644 --- a/boards/openmote-b/Makefile.include +++ b/boards/openmote-b/Makefile.include @@ -5,8 +5,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*))) PROGRAMMER ?= cc2538-bsl CC2538_BSL_FLAGS_OPTS ?= --bootloader-invert-lines -ifeq ($(PROGRAMMER),cc2538-bsl) - FLASHFILE ?= $(HEXFILE) -endif +CC2538_BSL_FLASHFILE ?= $(HEXFILE) include $(RIOTBOARD)/common/cc2538/Makefile.include diff --git a/boards/openmote-cc2538/Makefile.include b/boards/openmote-cc2538/Makefile.include index 79b0e8d2a0..8aad9c6654 100644 --- a/boards/openmote-cc2538/Makefile.include +++ b/boards/openmote-cc2538/Makefile.include @@ -3,9 +3,6 @@ PORT_LINUX ?= /dev/ttyUSB0 PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*))) PROGRAMMER ?= cc2538-bsl - -ifeq ($(PROGRAMMER),cc2538-bsl) - FLASHFILE ?= $(HEXFILE) -endif +CC2538_BSL_FLASHFILE ?= $(HEXFILE) include $(RIOTBOARD)/common/cc2538/Makefile.include diff --git a/makefiles/tools/cc2538-bsl.inc.mk b/makefiles/tools/cc2538-bsl.inc.mk index 59da9006ae..acd44b79eb 100644 --- a/makefiles/tools/cc2538-bsl.inc.mk +++ b/makefiles/tools/cc2538-bsl.inc.mk @@ -1,4 +1,5 @@ -FLASHFILE ?= $(BINFILE) +CC2538_BSL_FLASHFILE ?= $(BINFILE) +FLASHFILE ?= $(CC2538_BSL_FLASHFILE) CC2538_BSL ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py PROG_BAUD ?= 500000 # default value in cc2538-bsl