Skip to content

Commit 7b31b0e

Browse files
erwangombolivar-nordic
authored andcommitted
scripts: west_commands: openocd: Use 'reset init' by default
Instead of 'reset halt', default the command to reset and halt the target to 'reset init'. OpenOCD strictly requires 'reset init' to halt and prepare the device before flash programming. See https://openocd.org/doc/html/Flash-Commands.html chapter "12.2 Preparing a Target before Flash Programming." For targets implementing the init hook, it will allows to perform some target specific init improvements (such as speed flash improvements). Targets not implementing this hook will end up executing the usual and previous 'halt'. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
1 parent 03c8deb commit 7b31b0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/west_commands/runners/openocd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
DEFAULT_OPENOCD_TCL_PORT = 6333
2121
DEFAULT_OPENOCD_TELNET_PORT = 4444
2222
DEFAULT_OPENOCD_GDB_PORT = 3333
23-
DEFAULT_OPENOCD_RESET_HALT_CMD = 'reset halt'
23+
DEFAULT_OPENOCD_RESET_HALT_CMD = 'reset init'
2424
DEFAULT_OPENOCD_TARGET_HANDLE = "_TARGETNAME"
2525

2626
class OpenOcdBinaryRunner(ZephyrBinaryRunner):

0 commit comments

Comments
 (0)