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:
|
|
|
|
PORT_LINUX ?= $(word 2,$(shell $(RIOTBASE)/dist/tools/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
|
2014-10-30 19:44:05 +01:00
|
|
|
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
|
|
|
export DEBUGSERVER = JLinkGDBServer -device CC2538SF53
|
|
|
|
export 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)
|
2016-08-30 21:39:39 +02:00
|
|
|
export FLASHER = $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
|
2014-10-30 19:44:05 +01:00
|
|
|
export FFLAGS = -p "$(PORT)" -e -w -v $(HEXFILE)
|
|
|
|
else ifeq ($(PROGRAMMER),jlink)
|
|
|
|
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
|
|
|
export FFLAGS = $(BINDIR) $(HEXFILE)
|
|
|
|
endif
|
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
export OFLAGS = -O binary --gap-fill 0xff
|
2014-10-30 19:44:05 +01:00
|
|
|
export HEXFILE = $(ELFFILE:.elf=.bin)
|
|
|
|
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
|
|
|
|
export RESET_FLAGS = $(BINDIR)
|
2014-10-13 15:29:49 +02:00
|
|
|
|
|
|
|
export OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb
|