2014-10-13 15:29:49 +02:00
|
|
|
# Define the cpu used by the CC2538DK board:
|
|
|
|
export CPU = cc2538
|
|
|
|
export CPU_MODEL ?= cc2538nf53
|
|
|
|
|
2016-05-18 21:18:35 +02:00
|
|
|
# the SmartRF06 Evaluation Board serial numbers all begin with "06EB":
|
|
|
|
export PROGRAMMER_SERIAL ?= 06EB
|
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# setup serial terminal
|
2016-05-18 21:18:35 +02:00
|
|
|
# the debug UART is always the second tty with the matching serial number:
|
2018-05-15 11:23:44 +02:00
|
|
|
PORT_LINUX ?= $(word 2,$(shell $(RIOTTOOLS)/usb-serial/find-tty.sh '^$(PROGRAMMER_SERIAL)'))
|
2016-03-07 19:38:50 +01:00
|
|
|
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*)))
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/tools/serial.inc.mk
|
2014-10-13 15:29:49 +02:00
|
|
|
|
2017-11-07 17:14:56 +01:00
|
|
|
# setup emulator
|
|
|
|
include $(RIOTMAKE)/tools/renode.inc.mk
|
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# debugger config
|
2019-05-17 13:52:34 +02:00
|
|
|
DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
|
|
|
DEBUGSERVER = JLinkGDBServer -device CC2538SF53
|
2019-05-17 13:52:34 +02:00
|
|
|
RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
|
2014-10-13 15:29:49 +02:00
|
|
|
|
|
|
|
# Define the flash-tool and default port:
|
2014-10-30 19:44:05 +01:00
|
|
|
export PROGRAMMER ?= cc2538-bsl
|
|
|
|
|
|
|
|
ifeq ($(PROGRAMMER),cc2538-bsl)
|
2019-05-17 13:52:34 +02:00
|
|
|
FLASHER = $(RIOTTOOLS)/cc2538-bsl/cc2538-bsl.py
|
|
|
|
FFLAGS = -p "$(PORT)" -e -w -v $(FLASHFILE)
|
2014-10-30 19:44:05 +01:00
|
|
|
else ifeq ($(PROGRAMMER),jlink)
|
2019-05-17 13:52:34 +02:00
|
|
|
FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
|
|
|
FFLAGS = $(BINDIR) $(FLASHFILE)
|
2014-10-30 19:44:05 +01:00
|
|
|
endif
|
|
|
|
|
2018-03-27 12:28:35 +02:00
|
|
|
OFLAGS = --gap-fill 0xff
|
2018-12-19 18:57:00 +01:00
|
|
|
FLASHFILE ?= $(BINFILE)
|
2019-05-17 13:52:34 +02:00
|
|
|
DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
|
2019-05-17 13:52:34 +02:00
|
|
|
RESET_FLAGS = $(BINDIR)
|
2014-10-13 15:29:49 +02:00
|
|
|
|
|
|
|
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|