Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support flashing OpenMote via serial interface with 'make flash' #4460

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions boards/openmote-cc2538/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,21 @@ export CPU_MODEL = cc2538sf53
PORT_LINUX ?= /dev/ttyUSB0
PORT_DARWIN ?= $(shell ls -1 /dev/tty.usbserial-* | head -n 1)

# setup JLink for flashing
export JLINK_DEVICE := cc2538sf53
export JLINK_FLASH_ADDR := 200000
export JLINK_IF := JTAG
include $(RIOTBOARD)/Makefile.include.jlink
# Set default flash tool
export PROGRAMMER ?= cc2538-bsl

ifeq ($(PROGRAMMER),jlink)
# setup JLink for flashing
export JLINK_DEVICE := cc2538sf53
export JLINK_FLASH_ADDR := 200000
export JLINK_IF := JTAG
include $(RIOTBOARD)/Makefile.include.jlink
else
export OFLAGS = -O binary
export HEXFILE = $(ELFFILE:.elf=.bin)
export FLASHER = python $(RIOTBASE)/dist/tools/cc2538-bsl/cc2538-bsl.py
export FFLAGS = -p "$(PORT)" -e -w -v -b 460800 $(HEXFILE)
endif

# setup serial terminal
include $(RIOTBOARD)/Makefile.include.serial