mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 15:03:53 +01:00
boards/openmote: use global JLink script
This commit is contained in:
parent
90512ce3ab
commit
f07a2758a0
@ -6,17 +6,11 @@ export CPU_MODEL = cc2538sf53
|
||||
PORT_LINUX ?= /dev/ttyUSB0
|
||||
PORT_DARWIN ?= $(shell ls -1 /dev/tty.usbserial-* | head -n 1)
|
||||
|
||||
#
|
||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
||||
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
||||
export DEBUGSERVER = JLinkGDBServer -device CC2538SF53
|
||||
export RESET = $(RIOTBOARD)/$(BOARD)/dist/reset.sh
|
||||
|
||||
export OFLAGS = -O binary
|
||||
export HEXFILE = $(ELFFILE:.elf=.bin)
|
||||
export FFLAGS = $(BINDIR) $(HEXFILE)
|
||||
export DEBUGGER_FLAGS = $(BINDIR) $(ELFFILE)
|
||||
export RESET_FLAGS = $(BINDIR)
|
||||
# setup JLink for flashing
|
||||
export JLINK_DEVICE := cc2538sf53
|
||||
export JLINK_FLASH_ADDR := 200000
|
||||
export JLINK_IF := JTAG
|
||||
include $(RIOTBOARD)/Makefile.include.jlink
|
||||
|
||||
# setup serial terminal
|
||||
include $(RIOTBOARD)/Makefile.include.serial
|
||||
|
||||
17
boards/openmote-cc2538/dist/debug.sh
vendored
17
boards/openmote-cc2538/dist/debug.sh
vendored
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Start in-circuit debugging on this board: this script starts up the GDB
|
||||
# client and connects to a GDB server.
|
||||
#
|
||||
# Start the GDB server first using the 'make debugserver' target
|
||||
|
||||
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
|
||||
BINDIR=$1
|
||||
ELFFILE=$2
|
||||
|
||||
# write GDB config file
|
||||
echo "target extended-remote 127.0.0.1:2331" > $BINDIR/gdb.cfg
|
||||
|
||||
# run GDB
|
||||
arm-none-eabi-gdb -tui -command=$BINDIR/gdb.cfg $ELFFILE
|
||||
23
boards/openmote-cc2538/dist/flash.sh
vendored
23
boards/openmote-cc2538/dist/flash.sh
vendored
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This flash script dynamically generates a file with a set of commands which
|
||||
# have to be handed to the flashing script of SEGGER (JLinkExe >4.84).
|
||||
# After that, JLinkExe will be executed with that set of commands to flash the
|
||||
# latest .bin file to the board.
|
||||
|
||||
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
|
||||
BINDIR=$1
|
||||
HEXFILE=$2
|
||||
FLASHADDR=200000
|
||||
|
||||
# setup JLink command file
|
||||
echo "speed 1000" >> $BINDIR/burn.seg
|
||||
echo "loadbin $HEXFILE $FLASHADDR" >> $BINDIR/burn.seg
|
||||
echo "r" >> $BINDIR/burn.seg
|
||||
echo "g" >> $BINDIR/burn.seg
|
||||
echo "exit" >> $BINDIR/burn.seg
|
||||
|
||||
# flash new binary to the board
|
||||
JLinkExe -device CC2538SF53 < $BINDIR/burn.seg
|
||||
echo ""
|
||||
17
boards/openmote-cc2538/dist/reset.sh
vendored
17
boards/openmote-cc2538/dist/reset.sh
vendored
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script resets a CC2538SF53 target using JLink called
|
||||
# with a pre-defined reset sequence.
|
||||
|
||||
# @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
||||
|
||||
BINDIR=$1
|
||||
|
||||
# create JLink command file for resetting the board
|
||||
echo "r" >> $BINDIR/reset.seg
|
||||
echo "g" >> $BINDIR/reset.seg
|
||||
echo "exit" >> $BINDIR/reset.seg
|
||||
|
||||
# reset the board
|
||||
JLinkExe -device CC2538SF53 < $BINDIR/reset.seg
|
||||
echo ""
|
||||
Loading…
x
Reference in New Issue
Block a user