mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools/openocd: add OPENOCD_DBG_EXTRA_CMD
This commit is contained in:
parent
bdeec688f5
commit
aff18b9599
4
dist/tools/openocd/openocd.sh
vendored
4
dist/tools/openocd/openocd.sh
vendored
@ -96,6 +96,8 @@
|
|||||||
# the target when starting a debug session. 'reset halt' can also be used
|
# the target when starting a debug session. 'reset halt' can also be used
|
||||||
# depending on the type of target.
|
# depending on the type of target.
|
||||||
: ${OPENOCD_DBG_START_CMD:=-c 'halt'}
|
: ${OPENOCD_DBG_START_CMD:=-c 'halt'}
|
||||||
|
# Extra commands to add when using debug
|
||||||
|
: ${OPENOCD_DBG_EXTRA_CMD:=}
|
||||||
# command used to reset the board
|
# command used to reset the board
|
||||||
: ${OPENOCD_CMD_RESET_RUN:="-c 'reset run'"}
|
: ${OPENOCD_CMD_RESET_RUN:="-c 'reset run'"}
|
||||||
# This is an optional offset to the base address that can be used to flash an
|
# This is an optional offset to the base address that can be used to flash an
|
||||||
@ -329,6 +331,7 @@ do_debug() {
|
|||||||
-c 'telnet_port ${TELNET_PORT}' \
|
-c 'telnet_port ${TELNET_PORT}' \
|
||||||
-c 'gdb_port ${GDB_PORT}' \
|
-c 'gdb_port ${GDB_PORT}' \
|
||||||
-c 'init' \
|
-c 'init' \
|
||||||
|
${OPENOCD_DBG_EXTRA_CMD} \
|
||||||
-c 'targets' \
|
-c 'targets' \
|
||||||
${OPENOCD_DBG_START_CMD} \
|
${OPENOCD_DBG_START_CMD} \
|
||||||
-l /dev/null & \
|
-l /dev/null & \
|
||||||
@ -356,6 +359,7 @@ do_debugserver() {
|
|||||||
-c 'telnet_port ${TELNET_PORT}' \
|
-c 'telnet_port ${TELNET_PORT}' \
|
||||||
-c 'gdb_port ${GDB_PORT}' \
|
-c 'gdb_port ${GDB_PORT}' \
|
||||||
-c 'init' \
|
-c 'init' \
|
||||||
|
${OPENOCD_DBG_EXTRA_CMD} \
|
||||||
-c 'targets' \
|
-c 'targets' \
|
||||||
-c 'halt'"
|
-c 'halt'"
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,10 @@ else ifeq ($(RIOT_TERMINAL),miniterm)
|
|||||||
else ifeq ($(RIOT_TERMINAL),jlink)
|
else ifeq ($(RIOT_TERMINAL),jlink)
|
||||||
TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh
|
TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh
|
||||||
TERMFLAGS = term-rtt
|
TERMFLAGS = term-rtt
|
||||||
|
else ifeq ($(RIOT_TERMINAL),semihosting)
|
||||||
|
TERMPROG = $(DEBUGGER)
|
||||||
|
TERMFLAGS = $(DEBUGGER_FLAGS)
|
||||||
|
OPENOCD_DBG_EXTRA_CMD += -c 'arm semihosting enable'
|
||||||
|
OPENOCD_DBG_EXTRA_CMD += -c 'set remotetimeout 10000'
|
||||||
|
$(call target-export-variables,term cleanterm,OPENOCD_DBG_EXTRA_CMD)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user