Skip to content

Commit

Permalink
nrf_modem: update binary linking to support HWMv2
Browse files Browse the repository at this point in the history
This commit updates the cmake configuration file to
recognize the new SOC names defined with HWMv2.

Signed-off-by: Mirko Covizzi <[email protected]>
  • Loading branch information
MirkoCovizzi committed Apr 3, 2024
1 parent d9d31fd commit 7025ac3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions nrf_modem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@

if(CONFIG_NRF_MODEM_LINK_BINARY)

string(REGEX REPLACE "_[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]$" "" arch_soc_dir ${CONFIG_SOC})

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

string(REPLACE "nrf" "nRF" arch_soc_dir ${CONFIG_SOC})

string(REGEX REPLACE "nRF91[356]1" "nRF9120" arch_soc_dir ${arch_soc_dir})

if(CONFIG_FPU)
if(CONFIG_FP_HARDABI)
set(float_dir hard-float)
Expand Down

0 comments on commit 7025ac3

Please sign in to comment.