boards/stm32f103c8: fix openocd config

When flashing multiple times the flasher gets stuck.
Default configuration is used that fixes running mulitple tests.
-c 'reset halt' is needed to support debug after config is changed.
This commit is contained in:
MrKevinWeiss 2018-08-10 14:41:35 +02:00
parent 91069e3ca9
commit 2bf16a5555
2 changed files with 26 additions and 1 deletions

View File

@ -30,5 +30,9 @@ else
export DEBUG_ADAPTER ?= stlink export DEBUG_ADAPTER ?= stlink
export STLINK_VERSION ?= 2 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 include $(RIOTMAKE)/tools/openocd.inc.mk
endif endif

View File

@ -1,4 +1,25 @@
source [find interface/stlink.cfg]
set WORKAREASIZE 0x5000
transport select "hla_swd"
set CHIPNAME STM32F103C8Tx
# Enable debug when in low power modes
set ENABLE_LOW_POWER 1
# Stop Watchdog counters when halt
set STOP_WATCHDOG 1
# STlink Debug clock frequency
set CLOCK_FREQ 4000
# use hardware reset, connect under reset
# connect_assert_srst needed if low power mode application running (WFI...)
reset_config srst_only srst_nogate connect_assert_srst
set CONNECT_UNDER_RESET 1
source [find target/stm32f1x.cfg] source [find target/stm32f1x.cfg]
reset_config none separate
$_TARGETNAME configure -rtos auto $_TARGETNAME configure -rtos auto