board: npcx: use templates for the openocd setup

The NPCX boards use the normal openocd setup with custom --cmd-load and
--cmd-verify. This can be done using the normal template instead of
calling board_set_flasher_ifnset and board_set_debugger_ifnset directly

Verified that the runner is indeed being called with the correct
arguments after this commit.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2023-03-24 15:47:15 +00:00 committed by Carles Cufí
parent 672aeace88
commit adde272ab7
2 changed files with 6 additions and 12 deletions

View file

@ -1,9 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
board_set_flasher_ifnset(openocd)
board_set_debugger_ifnset(openocd)
board_runner_args(openocd --cmd-load "npcx_write_image")
board_runner_args(openocd --cmd-verify "npcx_verify_image")
board_finalize_runner_args(openocd
--cmd-load "npcx_write_image"
--cmd-verify "npcx_verify_image"
)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

View file

@ -1,9 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
board_set_flasher_ifnset(openocd)
board_set_debugger_ifnset(openocd)
board_runner_args(openocd --cmd-load "npcx_write_image")
board_runner_args(openocd --cmd-verify "npcx_verify_image")
board_finalize_runner_args(openocd
--cmd-load "npcx_write_image"
--cmd-verify "npcx_verify_image"
)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)