boards: Add OpenOCD runner to bbc_microbit*

Add the ability to flash/debug BBC micro:bit boards using OpenOCD.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2023-08-16 13:13:45 +02:00 committed by Carles Cufí
commit d0d3f1446a
2 changed files with 12 additions and 1 deletions

View file

@ -2,7 +2,13 @@
board_runner_args(pyocd "--target=nrf51822") board_runner_args(pyocd "--target=nrf51822")
board_runner_args(jlink "--device=nRF51822_xxAA" "--speed=4000") board_runner_args(jlink "--device=nRF51822_xxAA" "--speed=4000")
set(OPENOCD_NRF5_SUBFAMILY "nrf51")
# Note: micro:bit DAPLink may be upgraded to J-Link OB by following the instructions at
# https://www.segger.com/products/debug-probes/j-link/models/other-j-links/bbc-microbit-j-link-upgrade/
# in which case the following line should be removed to default back to "jlink" OpenOCD interface
set(OPENOCD_NRF5_INTERFACE "cmsis-dap")
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)

View file

@ -3,7 +3,12 @@
board_runner_args(pyocd "--target=nrf52833") board_runner_args(pyocd "--target=nrf52833")
board_runner_args(nrfjprog "--nrf-family=NRF52") board_runner_args(nrfjprog "--nrf-family=NRF52")
board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000") board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000")
set(OPENOCD_NRF5_SUBFAMILY "nrf52")
# Note: micro:bit v2 DAPLink may be upgraded to J-Link OB by following the instructions at
# https://www.segger.com/products/debug-probes/j-link/models/other-j-links/bbc-microbit-j-link-upgrade/
# in which case the following line should be removed to default back to "jlink" OpenOCD interface
set(OPENOCD_NRF5_INTERFACE "cmsis-dap")
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)