mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 06:23:53 +01:00
Merge pull request #4460 from aeneby/openmote-flash
Support flashing OpenMote via serial interface with 'make flash'
This commit is contained in:
commit
87bdf43b71
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user