From 94dfc4dd941fcf61e8ecb9760723b2acdcb48d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 4 Mar 2019 14:13:28 +0100 Subject: [PATCH] boards/pba-d-01-kw2x: fix flashing from invalid state When in an invalid state, the board could not flash anymore. Like for example after flashing `tests/driver_adt7310` this makes it flash again. I used `reset_config srst_only` as the other kinetis boards are also configured that way. --- boards/pba-d-01-kw2x/Makefile.include | 4 ++++ boards/pba-d-01-kw2x/dist/openocd.cfg | 1 + 2 files changed, 5 insertions(+) diff --git a/boards/pba-d-01-kw2x/Makefile.include b/boards/pba-d-01-kw2x/Makefile.include index a98603a903..913454e0bb 100644 --- a/boards/pba-d-01-kw2x/Makefile.include +++ b/boards/pba-d-01-kw2x/Makefile.include @@ -29,5 +29,9 @@ endif # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk +# The board can become un-flashable after some firmware, 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 diff --git a/boards/pba-d-01-kw2x/dist/openocd.cfg b/boards/pba-d-01-kw2x/dist/openocd.cfg index 2be4cdf156..94a7042127 100644 --- a/boards/pba-d-01-kw2x/dist/openocd.cfg +++ b/boards/pba-d-01-kw2x/dist/openocd.cfg @@ -1,2 +1,3 @@ source [find target/kx.cfg] +reset_config srst_only $_TARGETNAME configure -rtos auto