diff --git a/boards/common/frdm/Makefile.include b/boards/common/frdm/Makefile.include index b12569e9c42cf..2873479e22aa8 100644 --- a/boards/common/frdm/Makefile.include +++ b/boards/common/frdm/Makefile.include @@ -31,6 +31,10 @@ endif # Configuration for OpenOCD v0.10.0 and newer export OPENOCD_CONFIG ?= $(RIOTBOARD)/common/frdm/dist/openocd-$(CPU_FAMILY).cfg +# 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' + # Check the flash configuration field before flashing export PRE_FLASH_CHECK_SCRIPT = $(RIOTCPU)/$(CPU)/dist/check-fcfield-elf.sh diff --git a/boards/common/frdm/dist/old-openocd-kx.cfg b/boards/common/frdm/dist/old-openocd-kx.cfg index 72ef312804167..12fc4cb26eb85 100644 --- a/boards/common/frdm/dist/old-openocd-kx.cfg +++ b/boards/common/frdm/dist/old-openocd-kx.cfg @@ -36,7 +36,7 @@ $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x1000 -work-a flash bank $_CHIPNAME.flash kinetis 0 0 0 0 $_TARGETNAME cortex_m reset_config sysresetreq -#reset_config srst_only srst_nogate connect_assert_srst +reset_config srst_only srst_nogate connect_assert_srst adapter_khz 1000 diff --git a/boards/common/frdm/dist/openocd-klx.cfg b/boards/common/frdm/dist/openocd-klx.cfg index 47a447b7b8d57..94d542dcd428d 100644 --- a/boards/common/frdm/dist/openocd-klx.cfg +++ b/boards/common/frdm/dist/openocd-klx.cfg @@ -16,7 +16,7 @@ transport select swd # Kinetis L series CPUs source [find target/klx.cfg] -reset_config srst_only +reset_config srst_only srst_nogate connect_assert_srst $_TARGETNAME configure -event gdb-attach { halt diff --git a/boards/common/frdm/dist/openocd-kx.cfg b/boards/common/frdm/dist/openocd-kx.cfg index 021f22074e26b..ff533917083ad 100644 --- a/boards/common/frdm/dist/openocd-kx.cfg +++ b/boards/common/frdm/dist/openocd-kx.cfg @@ -13,7 +13,7 @@ # Kinetis K series CPUs source [find target/kx.cfg] -reset_config srst_only +reset_config srst_only srst_nogate connect_assert_srst $_TARGETNAME configure -event gdb-attach { halt