Merge pull request #12158 from aabadie/pr/boards/stm32_connect_assert_srst
boards/stm32: generalize use of connect_assert_srst for flashing
This commit is contained in:
commit
8467dba680
@ -11,8 +11,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
# this board has an on-board ST-link adapter
|
# this board has an on-board ST-link adapter
|
||||||
DEBUG_ADAPTER ?= stlink
|
DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
# call a 'reset halt' command before starting the debugger
|
# this board can become un-flashable after a hardfault,
|
||||||
export OPENOCD_DBG_START_CMD = -c 'reset halt'
|
# 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
|
# this board uses openocd
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
|
|||||||
@ -12,6 +12,10 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))
|
|||||||
# setup serial terminal
|
# setup serial terminal
|
||||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
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
|
# all Nucleo boards have an on-board ST-link adapter
|
||||||
DEBUG_ADAPTER ?= stlink
|
DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
|
|||||||
2
boards/common/stm32/dist/stm32l0.cfg
vendored
2
boards/common/stm32/dist/stm32l0.cfg
vendored
@ -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."
|
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]
|
source [find target/stm32l0.cfg]
|
||||||
}
|
}
|
||||||
reset_config srst_only connect_assert_srst
|
reset_config srst_only
|
||||||
$_TARGETNAME configure -rtos auto
|
$_TARGETNAME configure -rtos auto
|
||||||
|
|||||||
@ -11,8 +11,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
# to flash this board, use an ST-link adapter
|
# to flash this board, use an ST-link adapter
|
||||||
DEBUG_ADAPTER ?= stlink
|
DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
# call a 'reset halt' command before starting the debugger
|
# this board can become un-flashable after a hardfault,
|
||||||
export OPENOCD_DBG_START_CMD = -c 'reset halt'
|
# 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
|
# this board uses openocd
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
|
|||||||
@ -11,8 +11,9 @@ include $(RIOTMAKE)/tools/serial.inc.mk
|
|||||||
# By default, flash this board using an ST-link adapter
|
# By default, flash this board using an ST-link adapter
|
||||||
DEBUG_ADAPTER ?= stlink
|
DEBUG_ADAPTER ?= stlink
|
||||||
|
|
||||||
# call a 'reset halt' command before starting the debugger
|
# this board can become un-flashable after a hardfault,
|
||||||
export OPENOCD_DBG_START_CMD = -c 'reset halt'
|
# 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
|
# this board uses openocd
|
||||||
include $(RIOTMAKE)/tools/openocd.inc.mk
|
include $(RIOTMAKE)/tools/openocd.inc.mk
|
||||||
|
|||||||
@ -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
|
# load the common Makefile.include for Nucleo boards
|
||||||
include $(RIOTBOARD)/common/nucleo64/Makefile.include
|
include $(RIOTBOARD)/common/nucleo64/Makefile.include
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user