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>
This commit is contained in:
parent
c79f1b0d94
commit
c828dcc60e
|
@ -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…
Reference in New Issue