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 <mirko.covizzi@nordicsemi.no>
  • Loading branch information
MirkoCovizzi authored and gmarull committed Apr 30, 2024
1 parent a7571c8 commit 581bb27
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nrf_modem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

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 "91[356]1" "9120" arch_soc_dir ${arch_soc_dir})

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

0 comments on commit 581bb27

Please sign in to comment.