Skip to content
Closed
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions boards/b-l072z-lrwan1/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# this board has an on-board ST-link adapter
export DEBUG_ADAPTER ?= stlink

# call a 'reset halt' command before starting the debugger
export OPENOCD_DBG_START_CMD = -c 'reset halt'

# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk
4 changes: 0 additions & 4 deletions boards/common/iotlab/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbserial*B)))
export BAUD = 500000
include $(RIOTMAKE)/tools/serial.inc.mk

# call a 'reset halt' command before starting the debugger
# it is required as `connect_assert_srst` is set
export OPENOCD_DBG_START_CMD = -c 'reset halt'

# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk

Expand Down
4 changes: 0 additions & 4 deletions boards/common/stm32f103c8/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,5 @@ else
export DEBUG_ADAPTER ?= stlink
export STLINK_VERSION ?= 2

# call a 'reset halt' command before starting the debugger
# it is required as `connect_assert_srst` is set
export OPENOCD_DBG_START_CMD = -c 'reset halt'

include $(RIOTMAKE)/tools/openocd.inc.mk
endif
8 changes: 4 additions & 4 deletions dist/tools/openocd/openocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@
# Debugger flags, will be passed to sh -c, remember to escape any quotation signs.
# Use ${DBG_DEFAULT_FLAGS} to insert the default flags anywhere in the string
: ${DBG_FLAGS:=${DBG_DEFAULT_FLAGS} ${DBG_EXTRA_FLAGS}}
# Initial target state when using debug, by default a 'halt' request is sent to
# the target when starting a debug session. 'reset halt' can also be used
# Initial target state when using debug, by default a 'reset halt' request is
# sent to the target when starting a debug session. 'halt' can also be used
# depending on the type of target.
: ${OPENOCD_DBG_START_CMD:=-c 'halt'}
: ${OPENOCD_DBG_START_CMD:="-c 'reset halt'"}
# command used to reset the board
: ${OPENOCD_CMD_RESET_RUN:="-c 'reset run'"}
# This is an optional offset to the base address that can be used to flash an
Expand Down Expand Up @@ -311,7 +311,7 @@ do_debugserver() {
-c 'gdb_port ${GDB_PORT}' \
-c 'init' \
-c 'targets' \
-c 'halt'"
${OPENOCD_DBG_START_CMD}"
}

do_reset() {
Expand Down