Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/stm32: generalize use of connect_assert_srst for flashing #12158

Merged
merged 4 commits into from
Sep 23, 2019
Merged
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
5 changes: 3 additions & 2 deletions boards/b-l072z-lrwan1/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# this board has an on-board ST-link adapter
DEBUG_ADAPTER ?= stlink

# call a 'reset halt' command before starting the debugger
export OPENOCD_DBG_START_CMD = -c 'reset halt'
# this board can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the board.
export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1

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

# nucleo boards can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the boards.
export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1

# all Nucleo boards have an on-board ST-link adapter
DEBUG_ADAPTER ?= stlink

Expand Down
2 changes: 1 addition & 1 deletion boards/common/stm32/dist/stm32l0.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ try {
puts "WARNING: Your Openocd version does not support dual bank flash on your board. Falling back to single bank flashing."
source [find target/stm32l0.cfg]
}
reset_config srst_only connect_assert_srst
reset_config srst_only
$_TARGETNAME configure -rtos auto
5 changes: 3 additions & 2 deletions boards/i-nucleo-lrwan1/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# to flash this board, use an ST-link adapter
DEBUG_ADAPTER ?= stlink

# call a 'reset halt' command before starting the debugger
export OPENOCD_DBG_START_CMD = -c 'reset halt'
# this board can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the boards.
export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1

# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk
5 changes: 3 additions & 2 deletions boards/lsn50/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
# By default, flash this board using an ST-link adapter
DEBUG_ADAPTER ?= stlink

# call a 'reset halt' command before starting the debugger
export OPENOCD_DBG_START_CMD = -c 'reset halt'
# this board can become un-flashable after a hardfault,
# use connect_assert_srst to always be able to flash or reset the boards.
export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1

# this board uses openocd
include $(RIOTMAKE)/tools/openocd.inc.mk
4 changes: 0 additions & 4 deletions boards/nucleo-f091rc/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# nucleo-f091rc can become un-flashable after a hardfault, use connect_assert_srst
# to always be able to flash or reset the board.
export OPENOCD_RESET_USE_CONNECT_ASSERT_SRST ?= 1

# load the common Makefile.include for Nucleo boards
include $(RIOTBOARD)/common/nucleo64/Makefile.include