2018-03-28 14:47:09 +02:00
|
|
|
# define the default port depending on the host OS
|
|
|
|
PORT_LINUX ?= /dev/ttyUSB1
|
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
|
|
|
|
2019-10-15 14:24:05 +02:00
|
|
|
# setup serial terminal
|
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
|
|
|
|
2018-03-28 14:47:09 +02:00
|
|
|
# Set default flash tool
|
|
|
|
export PROGRAMMER ?= cc2538-bsl
|
|
|
|
|
2019-10-15 14:24:05 +02:00
|
|
|
# For backward compatibility
|
|
|
|
ifneq (,$(PORT_BSL))
|
|
|
|
$(warning Warning! PORT_BSL is deprecated use PROG_DEV)
|
|
|
|
PROG_DEV ?= $(PORT_BSL)
|
|
|
|
endif
|
|
|
|
|
2018-03-28 14:47:09 +02:00
|
|
|
ifeq ($(PROGRAMMER),cc2538-bsl)
|
2019-07-17 16:48:50 +02:00
|
|
|
FLASHFILE ?= $(HEXFILE)
|
2019-05-17 13:52:34 +02:00
|
|
|
FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
2019-10-15 14:24:05 +02:00
|
|
|
FFLAGS = -p "$(PROG_DEV)" --bootloader-invert-lines -e -w -v -b 460800 $(FLASHFILE)
|
2019-07-17 16:48:50 +02:00
|
|
|
RESET ?= $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
2019-10-15 14:24:05 +02:00
|
|
|
RESET_FLAGS ?= -p "$(PROG_DEV)" --bootloader-invert-lines
|
2018-03-28 14:47:09 +02:00
|
|
|
else ifeq ($(PROGRAMMER),jlink)
|
2019-07-17 16:48:50 +02:00
|
|
|
# Special flashing and reset scripts are required due to board hardware
|
|
|
|
export FLASH_ADDR = 0x200000
|
|
|
|
export JLINK_DEVICE = CC2538SF53
|
|
|
|
export JLINK_IF = JTAG
|
|
|
|
export JLINK_RESET_FILE = $(RIOTBOARD)/$(BOARD)/dist/hw_reset.seg
|
|
|
|
include $(RIOTMAKE)/tools/jlink.inc.mk
|
2018-03-28 14:47:09 +02:00
|
|
|
endif
|
|
|
|
|
2019-08-27 16:06:41 +02:00
|
|
|
OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|