I want to use OpenOCD in the environment of NCS2.x.x and VSCode.

Until 1.9.0 of NCS, SES was recommended, so it was possible to use OpenOCD from there.
With NCS 2.x.x, VCS is recommended, so it's good to use it, but I want to continue using the OpenOCD environment, but I can't.

ncs\v2.0.2\zephyr\boards\arm\ubx_evkninab1_nrf52832\board.cmake

# u-blox EVK-NINA-B1 board configuration

# Copyright (c) 2021 u-blox AG
# SPDX-License-Identifier: Apache-2.0

board_runner_args(nrfjprog "--nrf-family=NRF52")
board_runner_args(jlink "--device=nRF52832_xxAA" "--speed=4000")
board_runner_args(pyocd "--target=nrf52832" "--frequency=4000000")
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)

It looks like it can be used, but does anyone know how to set it up?

C:\L\tools\OpenOCD\OpenOCD_x64_0.11.0+dev-00828-ga527112da>openocd.exe -s ./scripts  -f interface/cmsis-dap.cfg -f target/nrf52.cfg
Open On-Chip Debugger 0.11.0+dev-00828-ga527112da (2022-08-29-09:56)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 3333
Info : Listening on port 3333 for gdb connections

Related