Skip to content

Commit 168829f

Browse files
committed
boards/nrf52: always recover device before flashing with OpenOCD
1 parent 5d7194a commit 168829f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

boards/common/nrf52/Makefile.include

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ else
1818
PROGRAMMER ?= openocd
1919
endif
2020

21-
# setup OpenOCD for flashing. Version 0.10 of OpenOCD doesn't contain support
22-
# for nrf52dk and nrf52840dk boards. To use OpenOCD with these a version
23-
# build from source (master > 2018, August the 13rd) is required.
21+
# Setup OpenOCD for flashing. The nRF52 series is supported from OpenOCD v0.11
22+
# onwards.
2423
OPENOCD_DEBUG_ADAPTER ?= jlink
2524
OPENOCD_CONFIG = $(RIOTBOARD)/common/nrf52/dist/openocd.cfg
25+
26+
# From Build Code Fxx and later, the nRF52 device is automatically locked after
27+
# a power cycle and has to be recovered with a separate command after the
28+
# initialization. Otherwise the Flash can not be accessed.
29+
OPENOCD_POST_INIT_CMDS = -c 'nrf52_recover'

0 commit comments

Comments
 (0)