1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/makefiles/tools/cc2538-bsl.inc.mk

18 lines
645 B
Makefile

CC2538_BSL_FLASHFILE ?= $(BINFILE)
FLASHFILE ?= $(CC2538_BSL_FLASHFILE)
CC2538_BSL ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
PROG_BAUD ?= 500000 # default value in cc2538-bsl
CC2538_BSL_FLAGS_OPTS ?=
CC2538_BSL_FLAGS = $(if $(IMAGE_OFFSET), -a $(shell printf "0x%08x" $$(($(IMAGE_OFFSET) + $(ROM_START_ADDR)))))
CC2538_BSL_FLAGS += -p "$(PROG_DEV)" $(CC2538_BSL_FLAGS_OPTS) --write-erase -v -b $(PROG_BAUD) $(FLASHFILE)
FLASHER ?= $(CC2538_BSL)
FFLAGS ?= $(CC2538_BSL_FLAGS)
RESET ?= $(FLASHER) -p "$(PROG_DEV)" $(CC2538_BSL_FLAGS_OPTS) -b $(PROG_BAUD)
ifeq ($(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py,$(FLASHER))
FLASHDEPS += $(FLASHER)
endif