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
|
2019-11-27 14:31:01 +01:00
|
|
|
PROGRAMMER ?= cc2538-bsl
|
2018-03-28 14:47:09 +02:00
|
|
|
|
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)
|
2020-03-06 20:51:22 +01:00
|
|
|
FFLAGS_OPTS ?= --bootloader-invert-lines
|
|
|
|
PROG_BAUD ?= 460800
|
|
|
|
include $(RIOTMAKE)/tools/cc2538-bsl.inc.mk
|
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
|
2020-03-03 16:22:30 +01:00
|
|
|
FLASH_ADDR = 0x200000
|
2020-03-03 11:56:38 +01:00
|
|
|
JLINK_DEVICE = CC2538SF53
|
2020-03-03 16:14:54 +01:00
|
|
|
JLINK_IF = JTAG
|
2020-03-03 16:19:43 +01:00
|
|
|
JLINK_RESET_FILE = $(RIOTBOARD)/openmote-b/dist/hw_reset.seg
|
2019-07-17 16:48:50 +02:00
|
|
|
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
|
2020-03-24 09:27:59 +01:00
|
|
|
|
|
|
|
# include common cc2538 includes
|
|
|
|
INCLUDES += -I$(RIOTBOARD)/common/cc2538/include
|