Problem building project in nRF9160DK (error: static assertion failed: "The libmodem shmem configuration exceeds the range of memory readable by the Modem core")

Hi.

We are working on a project which uses nrF9160DK and nRF5340DK, which works fine on this last one. The problem is that when I tried building on the 9160 using nRF Connect SDK (1.8.0), the following error appears:

FAILED: modules/nrf/lib/nrf_modem_lib/CMakeFiles/..__nrf__lib__nrf_modem_lib.dir/shmem_sanity.c.obj
C:\ncs\v1.8.0\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.7.0-ncs1 -DEXT_API_MAGIC=0x281ee6de,0xb845acea,23298 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,23298 -DKERNEL -DNRF9160_XXAA -DNRF_TRUSTZONE_NONSECURE -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v1.8.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v1.8.0/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/ncs/v1.8.0/zephyr/lib/util/fnmatch/. -IC:/ncs/v1.8.0/nrf/include -IC:/ncs/v1.8.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v1.8.0/modules/hal/nordic/nrfx -IC:/ncs/v1.8.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v1.8.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v1.8.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v1.8.0/nrfxlib/nrf_modem/include -isystem C:/ncs/v1.8.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/v1.8.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/ncs/v1.8.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -Os -imacros C:/Users/mario/OneDrive/Escritorio/bls-hsm/cli/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/ncs/v1.8.0/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/mario/OneDrive/Escritorio/bls-hsm/cli=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v1.8.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v1.8.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT modules/nrf/lib/nrf_modem_lib/CMakeFiles/..__nrf__lib__nrf_modem_lib.dir/shmem_sanity.c.obj -MF modules\nrf\lib\nrf_modem_lib\CMakeFiles\..__nrf__lib__nrf_modem_lib.dir\shmem_sanity.c.obj.d -o modules/nrf/lib/nrf_modem_lib/CMakeFiles/..__nrf__lib__nrf_modem_lib.dir/shmem_sanity.c.obj -c C:/ncs/v1.8.0/nrf/lib/nrf_modem_lib/shmem_sanity.c
In file included from C:\ncs\v1.8.0\zephyr\include\toolchain.h:50,
from C:\ncs\v1.8.0\nrf\lib\nrf_modem_lib\shmem_sanity.c:7:
C:\ncs\v1.8.0\zephyr\include\toolchain\gcc.h:61:36: error: static assertion failed: "The libmodem shmem configuration exceeds the range of memory readable by the Modem core"
61 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
| ^~~~~~~~~~~~~~
C:\ncs\v1.8.0\nrf\lib\nrf_modem_lib\shmem_sanity.c:18:1: note: in expansion of macro 'BUILD_ASSERT'
18 | BUILD_ASSERT(SHMEM_IN_USE < SHMEM_END,
| ^~~~~~~~~~~~

As far as I know, it should work in both boards fine without any change. Is there any way to solve it?

Thanks.

Related