openocd/src
Antonio Borneo e282d20832 openocd: prevent target polling during 'init'
The command 'init' causes the execution of few lower level
commands, e.g. 'target init', and switches from command mode
COMMAND_CONFIG to COMMAND_EXEC, with an intermediate switch back
to mode COMMAND_CONFIG.

A timed target polling can occur during the execution of 'init'
and the target's status can trigger the execution of some events.
E.g. if a target has been left halted by a previous execution of
OpenOCD, the first poll will find the target halted, calling the
corresponding 'halted' event.
The event handler can use commands that can only be executed in
mode COMMAND_EXEC. If the poll happens while OpenOCD is in mode
COMMAND_CONFIG, the triggered handler will fail.

Prevent the target polling to operate during the execution of the
'init' command.

Change-Id: Ia435a5d2039be9b247e2336616dab53ed5d983ac
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7007
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2022-08-15 13:22:18 +00:00
..
flash target: add API to temporarily mask target polling 2022-08-15 13:22:06 +00:00
helper target: add API to temporarily mask target polling 2022-08-15 13:22:06 +00:00
jtag target: add API to temporarily mask target polling 2022-08-15 13:22:06 +00:00
pld openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
rtos rtos: Support for "none" rtos 2022-08-15 13:19:21 +00:00
rtt openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
server gdb_server: add "not supported" Z-packet reply 2022-08-15 13:21:37 +00:00
svf openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
target target: add API to temporarily mask target polling 2022-08-15 13:22:06 +00:00
transport openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
xsvf openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
Makefile.am openocd: build: add SPDX tag 2022-07-23 13:06:38 +00:00
hello.c openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
openocd.c openocd: prevent target polling during 'init' 2022-08-15 13:22:18 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00