Skip to content

Commit 38b019c

Browse files
committed
nrf_modem: update binary linking to support HWMv2
This commit updates the cmake configuration file to recognize the new SOC names defined with HWMv2. Signed-off-by: Mirko Covizzi <[email protected]>
1 parent d9d31fd commit 38b019c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

nrf_modem/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
if(CONFIG_NRF_MODEM_LINK_BINARY)
88

9-
string(REGEX REPLACE "_[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]$" "" arch_soc_dir ${CONFIG_SOC})
10-
11-
if(NOT arch_soc_dir MATCHES "nRF9160")
12-
string(REGEX REPLACE "nRF91[0-9]*" "nRF9120" arch_soc_dir ${arch_soc_dir})
9+
if(NOT ${CONFIG_SOC} MATCHES "^nrf9160$" AND NOT ${CONFIG_SOC} MATCHES "^nrf91[356]1$")
10+
message(FATAL_ERROR "Unknown SOC. Expected (nrf9160, nrf9131, nrf9151, nrf9161), "
11+
"got '${CONFIG_SOC}'.")
1312
endif()
1413

14+
string(REPLACE "nrf" "nRF" arch_soc_dir ${CONFIG_SOC})
15+
string(REGEX REPLACE "91[356]1" "9120" arch_soc_dir ${arch_soc_dir})
16+
1517
if(CONFIG_FPU)
1618
if(CONFIG_FP_HARDABI)
1719
set(float_dir hard-float)

0 commit comments

Comments
 (0)