Browse Source

boards: common: openocd-nrf5: Add HWMv2 support

Adds support for determining the running from the identifier
which is needed for HWMv2

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
pull/69687/head
Jamie McCrae 1 year ago committed by Carles Cufi
parent
commit
c828dcc60e
  1. 7
      boards/common/openocd-nrf5.board.cmake

7
boards/common/openocd-nrf5.board.cmake

@ -6,9 +6,14 @@ @@ -6,9 +6,14 @@
#
# Boards which don't meet this convention can set this variable before
# including this script.
if (NOT DEFINED OPENOCD_NRF5_SUBFAMILY)
if(NOT DEFINED OPENOCD_NRF5_SUBFAMILY)
string(REGEX MATCH nrf5. OPENOCD_NRF5_SUBFAMILY "${BOARD}")
if(HWMv2 AND "${OPENOCD_NRF5_SUBFAMILY}" STREQUAL "")
string(REGEX MATCH nrf5. OPENOCD_NRF5_SUBFAMILY "${BOARD_IDENTIFIER}")
endif()
endif()
if("${OPENOCD_NRF5_SUBFAMILY}" STREQUAL "")
message(FATAL_ERROR
"Can't match nrf5 subfamily from BOARD name. "

Loading…
Cancel
Save