board/samr21-xpro: use unified openocd script
This commit is contained in:
parent
596b7ce734
commit
de3200a88f
@ -14,9 +14,12 @@ export AS = $(PREFIX)as
|
||||
export LINK = $(PREFIX)gcc
|
||||
export SIZE = $(PREFIX)size
|
||||
export OBJCOPY = $(PREFIX)objcopy
|
||||
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm -p
|
||||
export FLASHER = $(RIOTBOARD)/$(BOARD)/dist/flash.sh
|
||||
export DEBUGGER = $(RIOTBOARD)/$(BOARD)/dist/debug.sh
|
||||
export DBG = $(PREFIX)gdb
|
||||
export TERMPROG = $(RIOTBASE)/dist/tools/pyterm/pyterm
|
||||
export FLASHER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
||||
export DEBUGGER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
||||
export DEBUGSERVER = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
||||
export RESET = $(RIOTBASE)/dist/tools/openocd/openocd.sh
|
||||
|
||||
# define build specific options
|
||||
export CPU_USAGE = -mcpu=cortex-m0plus
|
||||
@ -27,10 +30,12 @@ export ASFLAGS += -ggdb -g3 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian
|
||||
export LINKFLAGS += -g3 -ggdb -std=gnu99 $(CPU_USAGE) $(FPU_USAGE) -mlittle-endian -static -lgcc -mthumb -mno-thumb-interwork -nostartfiles
|
||||
# linkerscript specified in cpu/Makefile.include
|
||||
export LINKFLAGS += -T$(LINKERSCRIPT)
|
||||
export OFLAGS += -O binary
|
||||
export FFLAGS += $(HEXFILE)
|
||||
export DEBUGGER_FLAGS = $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)
|
||||
export TERMFLAGS += "$(PORT)"
|
||||
export OFLAGS = -O ihex
|
||||
export TERMFLAGS += -p "$(PORT)"
|
||||
export FFLAGS = flash
|
||||
export DEBUGGER_FLAGS = debug
|
||||
export DEBUGSERVER_FLAGS = debug-server
|
||||
export RESET_FLAGS = reset
|
||||
|
||||
# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++
|
||||
export CXXUWFLAGS +=
|
||||
|
||||
19
boards/samr21-xpro/dist/debug.sh
vendored
19
boards/samr21-xpro/dist/debug.sh
vendored
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
openocd -f "board/atmel_samr21_xplained_pro.cfg" \
|
||||
-c "tcl_port 6333" \
|
||||
-c "telnet_port 4444" \
|
||||
-c "init" \
|
||||
-c "targets" \
|
||||
-c "reset halt" \
|
||||
-l /dev/null &
|
||||
|
||||
# save pid to terminate afterwards
|
||||
OCD_PID=$?
|
||||
|
||||
# needed for openocd to set up
|
||||
sleep 5
|
||||
|
||||
arm-none-eabi-gdb -tui --command=${1} ${2}
|
||||
|
||||
kill ${OCD_PID}
|
||||
11
boards/samr21-xpro/dist/flash.sh
vendored
11
boards/samr21-xpro/dist/flash.sh
vendored
@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
openocd -f "board/atmel_samr21_xplained_pro.cfg" \
|
||||
-c "init" \
|
||||
-c "targets" \
|
||||
-c "reset halt" \
|
||||
-c "reset init" \
|
||||
-c "flash write_image erase $1" \
|
||||
-c "verify_image $1" \
|
||||
-c "reset run" \
|
||||
-c "shutdown"
|
||||
2
boards/samr21-xpro/dist/gdb.conf
vendored
2
boards/samr21-xpro/dist/gdb.conf
vendored
@ -1,2 +0,0 @@
|
||||
target remote localhost:3333
|
||||
monitor reset halt
|
||||
1
boards/samr21-xpro/dist/openocd.cfg
vendored
Normal file
1
boards/samr21-xpro/dist/openocd.cfg
vendored
Normal file
@ -0,0 +1 @@
|
||||
source [find board/atmel_samr21_xplained_pro.cfg]
|
||||
Loading…
x
Reference in New Issue
Block a user