2014-10-13 15:29:49 +02:00
|
|
|
# Define the cpu used by the CC2538DK board:
|
|
|
|
export CPU = cc2538
|
|
|
|
export CPU_MODEL ?= cc2538nf53
|
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# setup serial terminal
|
|
|
|
export PORT ?= /dev/ttyUSB1
|
|
|
|
include $(RIOTBOARD)/Makefile.include.serial
|
2014-10-13 15:29:49 +02:00
|
|
|
|
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)
|
2015-08-08 15:59:25 +02:00
|
|
|
export FLASHER = python $(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
|
|
|
|
|
2015-04-22 15:45:34 +02:00
|
|
|
# include cortex defaults
|
2015-05-28 15:09:17 +02:00
|
|
|
include $(RIOTBOARD)/Makefile.include.cortexm_common
|