I am currently trying to port an application derived from multiple samples to nrf9160dk_nrf9160_ns. I'm running into an issue with the modem shlib:
error: static assertion failed: "The libmodem shmem configuration exceeds the range of memory readable by the Modem core"
81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
From another thread it appears this happens when the partition manager places the modem shared memory beyond the first 128-k of sram.
In my application, I am trying to delay switching to static partition management until the expected sizes of the tfm and application are better understood, since each time a region changes there tends to be multiple cascading changes in hardcoded addresses.
I have found that the partition manager places the shared modem region into non-secure sram region (sram_nonsecure) which is placed after the tfm_sram region which happens to be larger than 128k.
If possible I would like to find a way to get the modem shared space placed in the first 128k WITHOUT locking the rest of the SRAM into rigid/fixed sizes and definitely without locking the flash partitioning.
Is there any way to tell partition manager the modem shared memory needs to be placed in the first 128KB of SRAM?
I'm guessing that the minimal configuration for tfm reduces the sram partition. How can I determine the actual memory needed by my non-minimal TFM configuration.. perhaps TFM can get by with less than the 0x46000