<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96093/nrf9160-porting-the-modem-library-to-work-with-bare-metal-application</link><description>I would like some help with porting the modem library (nrf_modem_lib) to work with my bare metal application. Besides a custom nrf_modem_os.c, I have made a slightly modified version of nrfx_ipc.c that explicitly uses the non-secure registers for the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Mar 2025 17:56:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96093/nrf9160-porting-the-modem-library-to-work-with-bare-metal-application" /><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/526249?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 17:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be141b16-a247-4f4e-a280-bbaab5c21752</guid><dc:creator>Lakier15</dc:creator><description>&lt;p&gt;Thank you. This saved me. As soon as I restored the UICR it all started working (porting nrf9151 to Rust Embassy).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/443616?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2023 20:04:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32f04519-97ed-49b4-b719-87457a864ef5</guid><dc:creator>apaul88</dc:creator><description>&lt;p&gt;I also ran into many similar issues while trying to port the modem library to work with a bare metal application. Here are some problems I ran into for other people who find this question:&lt;/p&gt;
&lt;p&gt;1. As mentioned, the IPC and POWER peripherals must be set as nonsecure as well as the shared RAM&lt;/p&gt;
&lt;p&gt;2. The modem seems to require a delay to startup. I noticed things started working when I had breakpoints.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;nrf_modem_os_sem_take() MUST be implemented or at least wait for a while. I also found it needed to wait longer than the timeout parameter given. The documentation says this function can return 0 without threading but that is NOT true. Hopefully Nordic can correct that in the documentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/435351?ContentTypeID=1</link><pubDate>Sat, 08 Jul 2023 07:42:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16bd80fb-8a11-4162-b8d9-0475ceae5d1a</guid><dc:creator>raiden00</dc:creator><description>&lt;p&gt;Hi, I seem to have run into the same problem as the author while working on the NRF91 port to Apache NuttX.&lt;br /&gt;The problem turned out to be erased UICR registers. When XFXOSRC and XFXOCNT are reset, the modem won&amp;#39;t boot (or the modem core fails otherwise), and the modem library code blocks while waiting for the sempahore.&lt;br /&gt;No IPC interrupts appear (but manual triggering via NVIC works).&lt;br /&gt;&lt;br /&gt;A fix for this is present in nrfx/mdk/system_nrf91.c:SystemInit() but it is not documented at all.&lt;br /&gt;&lt;br /&gt;Please, Nordic team, document somewhere that erasing the UICR breaks the modem.&lt;br /&gt;This will save a lot of time for developers who don&amp;#39;t use nrfx :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/417975?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 20:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:261132bd-f4b5-42dc-b3c5-2ddcda3d3128</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Thank you, Didrik. I have opened a private ticket now &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/417937?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 15:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4836130f-96e5-47a6-b287-3e814162df95</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi, and sorry for the late response.&lt;/p&gt;
&lt;p&gt;It is good to hear that you managed to get a bit further.&lt;/p&gt;
&lt;p&gt;Could you open a private ticket with your code, along with instructions on how to build it, so we can try to reproduce what you are seeing?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/417740?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 15:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d7bcda-4b04-409d-8d33-5f1e95fe2471</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Now that the IPC interrupt seems to be working, I took another look at my implementation of &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_timedwait()&lt;/span&gt;. I cannot see anything wrong with the current implementation, but I made a version that uses a real timer instead of the rough delay. It did not make a difference at all, unfortunately.&lt;/p&gt;
&lt;p&gt;At this point in time, I think I have done everything I could to make this work, using all the information I could get from Nordic Semiconductor on their website and GitHub repositories. Very, very close, I believe, but it is still not working.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;My customer and I would like to get this solved as soon as possible, so we can continue the development of our application.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Therefore, I would like to ask Nordic Semiconductor if they can offer me paid support to sort out this problem once and for all. I guess an employee with good understanding of the modem library can find and solve the problem within a few hours. I can provide a ZIP-file with all sources and instructions on how to build the project.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If so, please write me a message here on DevZone or send me an email. Thanks in advance :-)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The updated &lt;span style="font-family:courier new, courier;"&gt;app/nrf_modem_os.c&lt;/span&gt; is included below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// NRF_MODEM_OS implementation                                  PVH, 2023-01-26
// Custom nrf_modem_os.c file that implements the functions defined in the
// nrf_modem_os.h header found in the sdk-nrfxlib
#include &amp;lt;nrf_modem.h&amp;gt;
#include &amp;lt;nrf_modem_os.h&amp;gt;
#include &amp;lt;nrfx_ipc.h&amp;gt; 
#include &amp;lt;nrf_errno.h&amp;gt;
#include &amp;lt;nrf.h&amp;gt;
#include &amp;quot;errno.h&amp;quot;

#include &amp;quot;defs.h&amp;quot;    // Constants and definition of fault handler function etc.
#include &amp;quot;delay.h&amp;quot;   // For use in nrf_modem_os_busywait()
#include &amp;quot;dyma.h&amp;quot;    // For dynamic memory allocation within the TX shared mem.
#include &amp;lt;stdlib.h&amp;gt;  // For malloc, free
#include &amp;lt;stdbool.h&amp;gt; // For bool
#include &amp;lt;stdio.h&amp;gt;   // For sprintf, vsprintf (logging)
#include &amp;lt;stdarg.h&amp;gt;  // For va_list, va_start, va_end (logging)
#include &amp;lt;string.h&amp;gt;  // For strlen (logging)

volatile bool nrf_modem_os_inside_isr;  // True while in ISR otherwise false
volatile bool nrf_modem_os_wakeup;  // Set true when a &amp;quot;thread&amp;quot; should wake up

static const struct nrf_modem_init_params init_params =
{
        .ipc_irq_prio = NRF_MODEM_NETWORK_IRQ_PRIORITY,
        .shmem.ctrl = {
                .base = NRF_MODEM_SHMEM_CTRL_BASE,
                .size = NRF_MODEM_SHMEM_CTRL_SIZE,
        },
        .shmem.tx = {
                .base = NRF_MODEM_SHMEM_TX_BASE,
                .size = NRF_MODEM_SHMEM_TX_SIZE,
        },
        .shmem.rx = {
                .base = NRF_MODEM_SHMEM_RX_BASE,
                .size = NRF_MODEM_SHMEM_RX_SIZE,
        },
        .shmem.trace = {
                .base = NRF_MODEM_SHMEM_TRACE_BASE,
                .size = NRF_MODEM_SHMEM_TRACE_SIZE,
        },
        .fault_handler = nrf_modem_fault_handler
};

const struct nrf_modem_init_params* nrf_modem_get_init_params()
{
    return &amp;amp;init_params;
}

void IPC_IRQHandler()
{
    NRF_P0_NS-&amp;gt;OUTSET = (1&amp;lt;&amp;lt;2); // Turn on LED1 for testing IRQ
    
    nrf_modem_os_inside_isr = true;
    nrfx_ipc_irq_handler();
	nrf_modem_os_event_notify();
	nrf_modem_os_inside_isr = false;
}

void nrf_modem_os_init(void)
{
    /* Initialize the glue layer and required peripherals. */
   
    // Initialize dynamic memory allocation for the TX region in shared memory
    dyma_init((void*)NRF_MODEM_SHMEM_TX_BASE, NRF_MODEM_SHMEM_TX_SIZE);
    
    nrf_modem_os_inside_isr = false;
    
    // Initialize TIMER1 for use in the nrf_modem_os_timedwait() function
    NRF_TIMER1_NS-&amp;gt;PRESCALER = 4; // Set the timer frequency to 1 MHz
    NRF_TIMER1_NS-&amp;gt;BITMODE = (TIMER_BITMODE_BITMODE_32Bit
        &amp;lt;&amp;lt; TIMER_BITMODE_BITMODE_Pos);
    NRF_TIMER1_NS-&amp;gt;MODE = 0;
    
    // Initialize LED1 on the nRF9160 board (for testing ISR)
    NRF_P0_NS-&amp;gt;DIRSET = (1&amp;lt;&amp;lt;2);
}

void nrf_modem_os_shutdown(void)
{
    /* Deinitialize the glue layer.
       When shutdown is called, all pending calls to nrf_modem_os_timedwait
       shall exit and return -NRF_ESHUTDOWN. */
    
    // This should make nrf_modem_os_timedwait return immediately
    nrf_modem_os_wakeup = true;
}

void* nrf_modem_os_shm_tx_alloc(size_t bytes)
{
    /* Allocate a buffer on the TX area of shared memory. */
    return dyma_alloc((void*)NRF_MODEM_SHMEM_TX_BASE, bytes);
}

void nrf_modem_os_shm_tx_free(void* mem)
{
    /* Free a shared memory buffer in the TX area. */
    dyma_free(mem);
}

void* nrf_modem_os_alloc(size_t bytes)
{
    /* Allocate a buffer on the library heap. */
    return malloc(bytes);
}

void nrf_modem_os_free(void* mem)
{
    /* Free a memory buffer in the library heap. */
    free(mem);
}

void nrf_modem_os_busywait(int32_t usec)
{
    /* Busy wait for a given amount of microseconds. */
    delay_us(usec);
}

int32_t nrf_modem_os_timedwait(uint32_t context, int32_t* timeout)
{
    // Return already if modem is not initialized
    if (! nrf_modem_is_initialized())
        return -NRF_ESHUTDOWN;
       
    // A timeout of 0 should return immediately, indiciating a timeout occured
    if (*timeout == 0)
        return -NRF_EAGAIN;
    
    // Clear the wakeup flag
    nrf_modem_os_wakeup = false;
    
    // A negative timeout value (or one that will overflow the CC register)
    // should make this function block forever, or until nrf_modem_os_wakeup 
    // becomes true
    if (*timeout &amp;lt; 0 || *timeout &amp;gt; 2147483) // Timer freq. is 1 MHz
    {
        while (! nrf_modem_os_wakeup);
        
        // Check if the modem has been uninitialized in the meantime
        if (! nrf_modem_is_initialized())
            return -NRF_ESHUTDOWN;
            
        return 0;
    }
       
    // Otherwise, we do a timed wait using TIMER1 and CC channel 0.
    NRF_TIMER1_NS-&amp;gt;TASKS_CLEAR = 1;
    NRF_TIMER1_NS-&amp;gt;CC[0] = *timeout * 1000ul; // Timer freq. is 1 MHz
    NRF_TIMER1_NS-&amp;gt;EVENTS_COMPARE[0] = 0;
    NRF_TIMER1_NS-&amp;gt;TASKS_START = 1;
    
    // Wait until timeout or until nrf_modem_os_wakeup is true
    while (! (NRF_TIMER1_NS-&amp;gt;EVENTS_COMPARE[0] || nrf_modem_os_wakeup));

    // Stop the timer and copy the timers internal counter register into
    // the CC register    
    NRF_TIMER1_NS-&amp;gt;TASKS_STOP = 1;
    NRF_TIMER1_NS-&amp;gt;TASKS_CAPTURE[0] = 1;
    
    // Compute the remaining time (original timeout minus elapsed time)
    *timeout = *timeout - ((int32_t)(NRF_TIMER1_NS-&amp;gt;CC[0]))/1000;
    
    // Avoid returning a negative result into the timeout ptr.
    if (*timeout &amp;lt; 0)
        *timeout = 0;
    
    // Check if the modem has been uninitialized in the meantime
    if (! nrf_modem_is_initialized())
        return -NRF_ESHUTDOWN;
    
    // Check if a timeout occured
    if (*timeout == 0)
        return -NRF_EAGAIN;

    return 0;
}

void nrf_modem_os_event_notify(void)
{
    /* Notify the application that an event has occurred.
       This shall wake all threads sleeping in nrf_modem_os_timedwait. */
       
    nrf_modem_os_wakeup = true;
}

void nrf_modem_os_errno_set(int errno_val)
{
    /* Set OS errno. */
}

bool nrf_modem_os_is_in_isr(void)
{
    /* Check if executing in interrupt context. */
    return nrf_modem_os_inside_isr;
}

int nrf_modem_os_sem_init(void** sem, unsigned int initial_count, 
    unsigned int limit)
{
    /* The function shall allocate and initialize a semaphore and return its 
       address through the `sem` parameter. If an address of an already 
       allocated semaphore is provided as an input, the allocation part is 
       skipped and the semaphore is only reinitialized. */
    return 0;
}

void nrf_modem_os_sem_give(void* sem)
{
    /* Give a semaphore. */
}

int nrf_modem_os_sem_take(void* sem, int timeout)
{
    /* Try to take a semaphore with the given timeout. */
    return 0;
}

unsigned int nrf_modem_os_sem_count_get(void* sem)
{
    /* Get a semaphore&amp;#39;s count. */
    return 0;
}

void nrf_modem_os_log(int level, const char* fmt, ...)
{
    // Block this function if inside ISR (for now)
    if (nrf_modem_os_inside_isr)
        return;
        
    static char data[1024];

    sprintf(data, &amp;quot;MODEM LOG (level %d): &amp;quot;, level);
    
    // Set up DMA parameters
    NRF_UARTE0_NS-&amp;gt;TXD.MAXCNT = (uint32_t)strlen(data);
    NRF_UARTE0_NS-&amp;gt;TXD.PTR = (uint32_t)data;
    
    // Transmit the string
    NRF_UARTE0_NS-&amp;gt;TASKS_STARTTX = 1;      // Start the transmission
    while (! NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX); // Wait for transmission to finish
    NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX = 0;       // Clear the ENDTX event
    
    // Format the string
    va_list args;
    va_start (args, fmt);
    vsprintf (data, fmt, args);
    va_end (args);
    
    strcat(data, &amp;quot;\r\n&amp;quot;);
    
    // Set up DMA parameters
    NRF_UARTE0_NS-&amp;gt;TXD.MAXCNT = (uint32_t)strlen(data);
    NRF_UARTE0_NS-&amp;gt;TXD.PTR = (uint32_t)data;
    
    // Transmit the string
    NRF_UARTE0_NS-&amp;gt;TASKS_STARTTX = 1;      // Start the transmission
    while (! NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX); // Wait for transmission to finish
    NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX = 0;       // Clear the ENDTX event
    
}

void nrf_modem_os_logdump(int level, const char* str, const void* data, 
    size_t len)
{
    /* Log hex representation of object. */
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/417246?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 21:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f114877-e5bc-463e-9566-4aa1d6cfe4d1</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;I found out today, that I can make the IPC interrupt work in secure mode. I added a custom&amp;nbsp;&lt;span style="font-family:courier new, courier;"&gt;IPC_IRQHandler()&lt;/span&gt; that would turn on LED1 in &lt;span style="font-family:courier new, courier;"&gt;boot/main.c&lt;/span&gt; and triggered it manually by calling &lt;span style="font-family:courier new, courier;"&gt;NVIC_SetPendingIRQ(IPC_IRQn)&lt;/span&gt;. It worked. Doing the same thing in non-secure mode (in &lt;span style="font-family:courier new, courier;"&gt;app/main.c&lt;/span&gt;) did not work.&lt;/p&gt;
&lt;p&gt;So, I looked in the &lt;a href="https://developer.arm.com/documentation/100235/0004/the-cortex-m33-peripherals/nested-vectored-interrupt-controller/interrupt-target-non-secure-registers?lang=en"&gt;Arm Cortex-M33 Devices Generic User Guide&lt;/a&gt; and found out that there is a series of NVIC registers called &lt;span style="font-family:courier new, courier;"&gt;ITNS&lt;/span&gt; that can be configured in secure mode, to set whether a specific interrupt targets the secure or non-secure state.&lt;/p&gt;
&lt;p&gt;I added this line to &lt;span style="font-family:courier new, courier;"&gt;boot/main.c&lt;/span&gt; just before switching to non-secure mode, and finally, the IPC interrupt gets called during modem initialization!&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NVIC-&amp;gt;ITNS[IPC_IRQn/32] |= 1&amp;lt;&amp;lt;(IPC_IRQn%32);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But... it did not solve the main problem, unfortunately. It is still getting stuck in an infinite loop&lt;/strong&gt;&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I have included the updated boot/main.c (other files are unchanged) as well as some output from GDB.&lt;/p&gt;
&lt;p&gt;boot/main.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// MAIN (secure bootloader)                                     PVH, 2023-01-26
#include &amp;quot;nrfx.h&amp;quot;
#include &amp;lt;arm_cmse.h&amp;gt;

// Typedef for non-secure function call
typedef int __attribute__((cmse_nonsecure_call)) nsfunc(void);

int main()
{
    // Ensure that non-secure access is permitted to all FLASH above 64k
    // (each FLASH region is 32 KiB)
    for (uint32_t i = 2; i &amp;lt; 32; ++i)
        NRF_SPU_S-&amp;gt;FLASHREGION[i].PERM &amp;amp;= 
            ~(1 &amp;lt;&amp;lt; SPU_FLASHREGION_PERM_SECATTR_Pos);
  
    // Ensure that non-secure access is permitted to all RAM above 64k
    // (each RAM region is 8 KiB)
    for (uint32_t i = 8; i &amp;lt; 32; ++i)
        NRF_SPU_S-&amp;gt;RAMREGION[i].PERM &amp;amp;= ~(1 &amp;lt;&amp;lt; SPU_RAMREGION_PERM_SECATTR_Pos);
  
    // Ensure that non-secure access is permitted to peripherals
    const uint32_t field = (1 &amp;lt;&amp;lt; SPU_PERIPHID_PERM_SECATTR_Pos);
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_CLOCK_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_POWER_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_UARTE0_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_TIMER0_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_TIMER1_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_EGU1_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_IPC_NS)].PERM &amp;amp;= ~field;
    NRF_SPU_S-&amp;gt;PERIPHID[NRFX_PERIPHERAL_ID_GET(NRF_P0_NS)].PERM &amp;amp;= ~field;
    
    // Allow non-secure use of all GPIOs
    NRF_SPU_S-&amp;gt;GPIOPORT[0].PERM = 0x00000000ul;
    
    // Ensure that IPC interrupt targets the non-secure state
    NVIC-&amp;gt;ITNS[IPC_IRQn/32] |= 1&amp;lt;&amp;lt;(IPC_IRQn%32);
    
    // Boot the non-secure application image located at address 0x10000
    SCB_NS-&amp;gt;VTOR = 0x10000ul;
    uint32_t* vtor = (uint32_t*)0x10000ul;
    __TZ_set_MSP_NS(vtor[0]);
    nsfunc *ns_reset = (nsfunc*)(vtor[1]); // Pointer to non-secure ResetHandler
    ns_reset();
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;GDB output where I interrupt it a few times to see where it is stuck:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Target interface speed set to 2000 kHz
Flash download enabled
Loading section .sec1, size 0xa74 lma 0x0
Loading section .sec2, size 0x3dc0 lma 0x10000
Start address 0x0, load size 18484
Transfer rate: 147872 bits in &amp;lt;1 sec, 9242 bytes/write.
Breakpoint 1 at 0x7d4: main. (2 locations)
Resets core &amp;amp; peripherals via SYSRESETREQ &amp;amp; VECTRESET bit.

Breakpoint 1, main () at boot/main.c:9
9	{
(gdb) cont
Continuing.

Breakpoint 1, main () at app/main.c:68
68	{
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00010792 in nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:150
150	    if (k == 0)
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
rpc_transport_ipc_handshake ()
    at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:533
533	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00010796 in nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:150
150	    if (k == 0)
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415793?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 16:12:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:771b7f21-6762-4c4d-87c4-a214ccc041a5</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;I am aware of this. I do all the TrustZone configuration in the secure bootloader, as shown in &lt;span style="font-family:courier new, courier;"&gt;boot/main.c,&lt;/span&gt; which then boots up the application image in non-secure mode. The modem related functions are only called in the non-secure application image - never in secure mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415790?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 16:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0af00be1-9e80-4922-a249-aa2af51c3164</guid><dc:creator>emdi</dc:creator><description>&lt;p&gt;All TrustZone configuration must be done by the Application, libmodem won&amp;#39;t and can&amp;#39;t change the security attributes since it is not part of the secure firmware image :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415786?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 16:00:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3766fc2-c999-49f6-928d-473a63f645ff</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Thanks again, emdi :-)&lt;/p&gt;
&lt;p&gt;This is already done in &lt;span style="font-family:courier new, courier;"&gt;boot/main.c&lt;/span&gt;, see line 24 and 29 for the peripherals.&lt;/p&gt;
&lt;p&gt;At line 18 and 19, I allow non-secure access to all memory above the first 64 kiB. The shared memory for the modem library is the first 32 kiB of the memory marked as non-secure.&lt;/p&gt;
&lt;p&gt;I believe this is correct. Otherwise, I would get HardFaultExceptions. I do not get any of these anymore, and the application is in fact running. It is just getting stuck in the modem library, but no exceptions are issued.&lt;/p&gt;
&lt;p&gt;Do I need to manually configure the NRF_POWER peripheral or do the modem library take care of this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415782?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 15:38:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9d143d3-01d4-4e12-8669-b22362aba3cf</guid><dc:creator>emdi</dc:creator><description>&lt;p&gt;You definitely need to set the NRF_IPC and NRF_POWER peripherals as non-secure, as well as the shared memory.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415773?ContentTypeID=1</link><pubDate>Thu, 16 Mar 2023 15:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e7ce365-d900-43c0-ab7b-cf50ff5db204</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Thanks for your suggestion, emdi.&lt;/p&gt;
&lt;p&gt;I did just try that, by inserting these lines just before line 80 in &lt;span style="font-family:courier new, courier;"&gt;app/main.c&lt;/span&gt;. It made no difference at all.&lt;/p&gt;
&lt;p&gt;I am wondering if I am supposed to do some global setup of the NVIC before interrupts will actually work? Or if they work in secure mode but non in non-secure mode unless I do something further? I have absolutely no idea. It is my first time programming an ARM MCU with TrustZone.&lt;/p&gt;
&lt;p&gt;Maybe the &lt;span style="font-family:courier new, courier;"&gt;IPC_IRQHandler()&lt;/span&gt; defined at line 50 in &lt;span style="font-family:courier new, courier;"&gt;app/nrf_modem_os.c&lt;/span&gt; is not recognized as an interrupt handler but just as a regular function that apparently never gets called?&lt;/p&gt;
&lt;p&gt;There is still the possibility that my slightly modified &lt;span style="font-family:courier new, courier;"&gt;nrfx_ipc.c&lt;/span&gt; is not working as it should...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415495?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 14:03:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc5c684b-aed6-48bc-aced-cd56bbbca49c</guid><dc:creator>emdi</dc:creator><description>&lt;p&gt;Can you try to enable the IRQ before calling `nrf_modem_init`?&lt;/p&gt;
&lt;p&gt;NVIC_SetPriority(IPC_IRQn, 0);&lt;br /&gt; NVIC_ClearPendingIRQ(IPC_IRQn);&lt;br /&gt; NVIC_EnableIRQ(IPC_IRQn);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;see if that gets you a bit further.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/415276?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 14:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11de24cf-f35f-4284-bece-fc3416f63530</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;I am still stuck with this problem. As mentioned earlier, it appears that the IPC interrupt does not occur at any time, which might explain why &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_init()&lt;/span&gt; gets stuck in a loop. Any ideas on what could be wrong are much appreciated.&lt;/p&gt;
&lt;p&gt;Thanks in advance &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/410424?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 15:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9eefb54-d3e4-4e60-86c0-0f869c67772f</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Thanks, emdi :-)&lt;/p&gt;
&lt;p&gt;I have made the &lt;span style="font-family:courier new, courier;"&gt;IPC_IRQHandler()&lt;/span&gt; turn LED1 on when it is called. It never turns on. So, the handler does not get called. This could explain why it is not working.&lt;/p&gt;
&lt;p&gt;I have not worked with interrupts on the nRF9160 before, so I am unsure if I need to do additional setup code in &lt;span style="font-family:courier new, courier;"&gt;app/main.c&lt;/span&gt; or &lt;span style="font-family:courier new, courier;"&gt;boot/main.c&lt;/span&gt;? Or, maybe I need to do further changes in &lt;span style="font-family:courier new, courier;"&gt;app/nrfx_ipc.c&lt;/span&gt;?&lt;/p&gt;
&lt;p&gt;Also, I have changed the line&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;*timeout = k / 4000;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;*timeout = *timeout - k / 4000;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in the &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_timedwait()&lt;/span&gt;. I know that this function is implemented crudely, but I might base it on a timer instead, later - if necessary.&lt;/p&gt;
&lt;p&gt;Finally, I have implemented &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_log()&lt;/span&gt; and linked with &lt;span style="font-family:courier new, courier;"&gt;libmodem_log.a&lt;/span&gt; - see below. I need to do some extra work to make it safe to call inside an ISR, so for now I just block the function if called inside the &lt;span style="font-family:courier new, courier;"&gt;IPC_IRQHandler()&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Here is the output:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:365px;max-width:525px;" alt="Modem log output" src="https://devzone.nordicsemi.com/resized-image/__size/1050x730/__key/communityserver-discussions-components-files/4/modem_5F00_log.png" /&gt;&lt;/p&gt;
&lt;p&gt;After this, it gets stuck as before. I guess it is waiting on the ISR that apparently never gets called, and then just keep calling the &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_timedwait()&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I also figured out that I might have a bug in my dynamic allocator for the TX region. But, I think we should get the ISR working before I start refining the code.&lt;/p&gt;
&lt;p&gt;The updated &lt;span style="font-family:courier new, courier;"&gt;app/nrf_modem_os.c&lt;/span&gt; is included below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// NRF_MODEM_OS implementation                                  PVH, 2023-01-26
// Custom nrf_modem_os.c file that implements the functions defined in the
// nrf_modem_os.h header found in the sdk-nrfxlib
#include &amp;lt;nrf_modem.h&amp;gt;
#include &amp;lt;nrf_modem_os.h&amp;gt;
#include &amp;lt;nrfx_ipc.h&amp;gt; 
#include &amp;lt;nrf_errno.h&amp;gt;
#include &amp;lt;nrf.h&amp;gt;
#include &amp;quot;errno.h&amp;quot;

#include &amp;quot;defs.h&amp;quot;    // Constants and definition of fault handler function etc.
#include &amp;quot;delay.h&amp;quot;   // For use in nrf_modem_os_busywait()
#include &amp;quot;dyma.h&amp;quot;    // For dynamic memory allocation within the TX shared mem.
#include &amp;lt;stdlib.h&amp;gt;  // For malloc, free
#include &amp;lt;stdbool.h&amp;gt; // For bool
#include &amp;lt;stdio.h&amp;gt;   // For sprintf, vsprintf (logging)
#include &amp;lt;stdarg.h&amp;gt;  // For va_list, va_start, va_end (logging)
#include &amp;lt;string.h&amp;gt;  // For strlen (logging)

volatile bool nrf_modem_os_inside_isr;  // True while in ISR otherwise false
volatile bool nrf_modem_os_wakeup;  // Set true when a &amp;quot;thread&amp;quot; should wake up

static const struct nrf_modem_init_params init_params =
{
        .ipc_irq_prio = NRF_MODEM_NETWORK_IRQ_PRIORITY,
        .shmem.ctrl = {
                .base = NRF_MODEM_SHMEM_CTRL_BASE,
                .size = NRF_MODEM_SHMEM_CTRL_SIZE,
        },
        .shmem.tx = {
                .base = NRF_MODEM_SHMEM_TX_BASE,
                .size = NRF_MODEM_SHMEM_TX_SIZE,
        },
        .shmem.rx = {
                .base = NRF_MODEM_SHMEM_RX_BASE,
                .size = NRF_MODEM_SHMEM_RX_SIZE,
        },
        .shmem.trace = {
                .base = NRF_MODEM_SHMEM_TRACE_BASE,
                .size = NRF_MODEM_SHMEM_TRACE_SIZE,
        },
        .fault_handler = nrf_modem_fault_handler
};

const struct nrf_modem_init_params* nrf_modem_get_init_params()
{
    return &amp;amp;init_params;
}

void IPC_IRQHandler()
{
    NRF_P0_NS-&amp;gt;OUTSET = (1&amp;lt;&amp;lt;2); // Turn on LED1 for testing IRQ
    
    nrf_modem_os_inside_isr = true;
    nrfx_ipc_irq_handler();
	nrf_modem_os_event_notify();
	nrf_modem_os_inside_isr = false;
}

void nrf_modem_os_init(void)
{
    /* Initialize the glue layer and required peripherals. */
   
    // Initialize dynamic memory allocation for the TX region in shared memory
    dyma_init((void*)NRF_MODEM_SHMEM_TX_BASE, NRF_MODEM_SHMEM_TX_SIZE);
    
    nrf_modem_os_inside_isr = false;
    
    // Initialize LED1 on the nRF9160 board (for testing ISR)
    NRF_P0_NS-&amp;gt;DIRSET = (1&amp;lt;&amp;lt;2);
}

void nrf_modem_os_shutdown(void)
{
    /* Deinitialize the glue layer.
       When shutdown is called, all pending calls to nrf_modem_os_timedwait
       shall exit and return -NRF_ESHUTDOWN. */
}

void* nrf_modem_os_shm_tx_alloc(size_t bytes)
{
    /* Allocate a buffer on the TX area of shared memory. */
    return dyma_alloc((void*)NRF_MODEM_SHMEM_TX_BASE, bytes);
}

void nrf_modem_os_shm_tx_free(void* mem)
{
    /* Free a shared memory buffer in the TX area. */
    dyma_free(mem);
}

void* nrf_modem_os_alloc(size_t bytes)
{
    /* Allocate a buffer on the library heap. */
    return malloc(bytes);
}

void nrf_modem_os_free(void* mem)
{
    /* Free a memory buffer in the library heap. */
    free(mem);
}

void nrf_modem_os_busywait(int32_t usec)
{
    /* Busy wait for a given amount of microseconds. */
    delay_us(usec);
}

int32_t nrf_modem_os_timedwait(uint32_t context, int32_t* timeout)
{
    if (! nrf_modem_is_initialized())
    {
        return -NRF_ESHUTDOWN;
    }

    /* Put a thread to sleep for a specific time or until an event occurs.
       Wait for the timeout.
       All waiting threads shall be woken by nrf_modem_event_notify.
       A blind return value of zero will cause a blocking wait. */
       
    nrf_modem_os_wakeup = false;
    
    // Wait until a timeout of approximately *timeout milliseconds or until
    // woken up by nrf_modem_os_event_notify()
    volatile uint32_t k = *timeout*4000;
    if (*timeout &amp;lt; 0)
        k = 0xFFFFFFFFul;   // Not infinite but pretty long timeout
        
    while (k &amp;gt; 0)
    {
        // If nrf_modem_os_event_notify() is called, wake up and return
        // the remaining time in *timeout
        if (nrf_modem_os_wakeup)
        {
            nrf_modem_os_wakeup = false;
            *timeout = *timeout - k / 4000;
            break;
        }
        
        // Countdown the time
        k--;
    }
    
    // Check if the modem has been uninitialized in the meantime
    if (! nrf_modem_is_initialized())
        return -NRF_ESHUTDOWN;
    
    // Check if while loop above was broken by a timeout
    if (k == 0)
        return -NRF_EAGAIN;

    return 0;
}

void nrf_modem_os_event_notify(void)
{
    /* Notify the application that an event has occurred.
       This shall wake all threads sleeping in nrf_modem_os_timedwait. */
       
    nrf_modem_os_wakeup = true;
}

void nrf_modem_os_errno_set(int errno_val)
{
    /* Set OS errno. */
}

bool nrf_modem_os_is_in_isr(void)
{
    /* Check if executing in interrupt context. */
    return nrf_modem_os_inside_isr;
}

int nrf_modem_os_sem_init(void** sem, unsigned int initial_count, 
    unsigned int limit)
{
    /* The function shall allocate and initialize a semaphore and return its 
       address through the `sem` parameter. If an address of an already 
       allocated semaphore is provided as an input, the allocation part is 
       skipped and the semaphore is only reinitialized. */
    return 0;
}

void nrf_modem_os_sem_give(void* sem)
{
    /* Give a semaphore. */
}

int nrf_modem_os_sem_take(void* sem, int timeout)
{
    /* Try to take a semaphore with the given timeout. */
    return 0;
}

unsigned int nrf_modem_os_sem_count_get(void* sem)
{
    /* Get a semaphore&amp;#39;s count. */
    return 0;
}

void nrf_modem_os_log(int level, const char* fmt, ...)
{
    // Block this function if inside ISR (for now)
    if (nrf_modem_os_inside_isr)
        return;
        
    static char data[1024];

    sprintf(data, &amp;quot;MODEM LOG (level %d): &amp;quot;, level);
    
    // Set up DMA parameters
    NRF_UARTE0_NS-&amp;gt;TXD.MAXCNT = (uint32_t)strlen(data);
    NRF_UARTE0_NS-&amp;gt;TXD.PTR = (uint32_t)data;
    
    // Transmit the string
    NRF_UARTE0_NS-&amp;gt;TASKS_STARTTX = 1;      // Start the transmission
    while (! NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX); // Wait for transmission to finish
    NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX = 0;       // Clear the ENDTX event
    
    // Format the string
    va_list args;
    va_start (args, fmt);
    vsprintf (data, fmt, args);
    va_end (args);
    
    strcat(data, &amp;quot;\r\n&amp;quot;);
    
    // Set up DMA parameters
    NRF_UARTE0_NS-&amp;gt;TXD.MAXCNT = (uint32_t)strlen(data);
    NRF_UARTE0_NS-&amp;gt;TXD.PTR = (uint32_t)data;
    
    // Transmit the string
    NRF_UARTE0_NS-&amp;gt;TASKS_STARTTX = 1;      // Start the transmission
    while (! NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX); // Wait for transmission to finish
    NRF_UARTE0_NS-&amp;gt;EVENTS_ENDTX = 0;       // Clear the ENDTX event
    
}

void nrf_modem_os_logdump(int level, const char* str, const void* data, 
    size_t len)
{
    /* Log hex representation of object. */
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/409639?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 14:38:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:538ba3d2-9def-4771-9733-9934c4407469</guid><dc:creator>emdi</dc:creator><description>&lt;p&gt;A few things,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;can you verify that the IPC IRQ handler is called?&lt;/li&gt;
&lt;li&gt;your implementation of `nrf_modem_os_timedwait()` does not look entirely correct. The `timeout` parameter should be updated with the amount of time left to sleep if the call wakes up before the timeout has expired&lt;/li&gt;
&lt;li&gt;if you turn could link with `libmodem_log.a` instead of `libmodem.a` you would get some prints from the library which could be helpful to debug this further. Keep in mind that some prints are emitted from ISR. In NCS, those the prints are deferred automatically to a thread context but in your case it will be different.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/409595?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2023 13:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec63313c-10a3-441c-88a8-52153316e1a7</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Thanks, emdi. I believe you are correct - my slightly modified &lt;span style="font-family:courier new, courier;"&gt;nrfx_ipc.c&lt;/span&gt; was based on nrfx version 2.9.0, even though the &lt;span style="font-family:courier new, courier;"&gt;Makefile&lt;/span&gt; is indicating nrfx 2.10.0. I have corrected this and included the new file below.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new, courier;"&gt;NRFX_CONFIG_API_VER_2_10&lt;/span&gt; is already defined in some of the nrfx headers that gets included, so if I define it globally in the &lt;span style="font-family:courier new, courier;"&gt;Makefile&lt;/span&gt;, the compiler complains of redefinition.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have made a clean build, flashed and debugged again. Same problem - stuck in the &lt;/strong&gt;&lt;span style="font-family:courier new, courier;"&gt;nrf_modem_init()&lt;/span&gt;&lt;strong&gt; function. Updating &lt;/strong&gt;&lt;span style="font-family:courier new, courier;"&gt;nrfx_ipc.c&lt;/span&gt;&lt;strong&gt; did not solve the problem, unfortunately. I would still like to know what else could be wrong. Any help and ideas are very appreciated.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is some output from GDB where I break the program a few times to see where it is stuck:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Target interface speed set to 2000 kHz
Flash download enabled
Loading section .sec1, size 0xa74 lma 0x0
Loading section .sec2, size 0x29a0 lma 0x10000
Start address 0x0, load size 13332
Transfer rate: 106656 bits in &amp;lt;1 sec, 6666 bytes/write.
Breakpoint 1 at 0x7d4: main. (2 locations)
Resets core &amp;amp; peripherals via SYSRESETREQ &amp;amp; VECTRESET bit.

Breakpoint 1, main () at boot/main.c:9
9	{
(gdb) cont
Continuing.

Breakpoint 1, main () at app/main.c:68
68	{
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) where
#0  rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
#1  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#2  0x00010c44 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#3  0x00010ace in nrf_modem_platform_init (params=0x125cc &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#4  nrf_modem_init (params=0x125cc &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#5  0x00010a26 in main () at app/main.c:80
#6  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00010ba4 in nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) where
#0  0x00010ba4 in nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
#1  0x00010b64 in nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
#2  0x00010702 in nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
#3  0x00010fe0 in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:535
#4  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#5  0x00010c44 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#6  0x00010ace in nrf_modem_platform_init (params=0x125cc &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#7  nrf_modem_init (params=0x125cc &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#8  0x00010a26 in main () at app/main.c:80
#9  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) cont
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:103
103	{
(gdb) where
#0  nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:103
#1  0x00010fe0 in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:535
#2  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#3  0x00010c44 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#4  0x00010ace in nrf_modem_platform_init (params=0x125cc &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#5  nrf_modem_init (params=0x125cc &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#6  0x00010a26 in main () at app/main.c:80
#7  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) 
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The updated version of my slightly modified &lt;span style="font-family:courier new, courier;"&gt;nrfx_ipc.c&lt;/span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Custom NRFX IPC implementation                               PVH, 2023-01-26
// Slightly modified version of nrfx/drivers/src/nrfx_ipc.c that is more
// independent of nrfx, and specificially uses the non-secure version of the
// NRF_IPC peripheral. Updated 2023-02-13 to nrfx-2.10.0 

/*
 * Copyright (c) 2019 - 2022, Nordic Semiconductor ASA
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived from this
 *    software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#include &amp;lt;nrfx.h&amp;gt;

//#if NRFX_CHECK(NRFX_IPC_ENABLED)

#include &amp;lt;nrfx_ipc.h&amp;gt;

// Control block - driver instance local data.
typedef struct
{
    nrfx_ipc_handler_t handler;
    nrfx_drv_state_t   state;
    void *             p_context;
} ipc_control_block_t;

static ipc_control_block_t m_ipc_cb;

nrfx_err_t nrfx_ipc_init(uint8_t irq_priority, nrfx_ipc_handler_t handler, void * p_context)
{
    if (m_ipc_cb.state != NRFX_DRV_STATE_UNINITIALIZED)
    {
        return NRFX_ERROR_ALREADY_INITIALIZED;
    }

    //NRFX_IRQ_PRIORITY_SET(IPC_IRQn, irq_priority);
    NVIC_SetPriority(IPC_IRQn, irq_priority);
    //NRFX_IRQ_ENABLE(IPC_IRQn);
    NVIC_EnableIRQ(IPC_IRQn);

    m_ipc_cb.state = NRFX_DRV_STATE_INITIALIZED;
    m_ipc_cb.handler = handler;
    m_ipc_cb.p_context = p_context;

    return NRFX_SUCCESS;
}

void nrfx_ipc_config_load(const nrfx_ipc_config_t * p_config)
{
    NRFX_ASSERT(p_config);
    NRFX_ASSERT(m_ipc_cb.state == NRFX_DRV_STATE_INITIALIZED);

    uint32_t i;
    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
    {
        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
    }

    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
    {
        nrf_ipc_receive_config_set(NRF_IPC_NS, i, p_config-&amp;gt;receive_event_config[i]);
    }

    nrf_ipc_int_enable(NRF_IPC_NS, p_config-&amp;gt;receive_events_enabled);
}

void nrfx_ipc_uninit(void)
{
    NRFX_ASSERT(m_ipc_cb.state == NRFX_DRV_STATE_INITIALIZED);

    uint32_t i;
    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
    {
        nrf_ipc_send_config_set(NRF_IPC_NS, i, 0);
    }

    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
    {
        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 0);
    }

    nrf_ipc_int_disable(NRF_IPC_NS, 0xFFFFFFFF);
    m_ipc_cb.state = NRFX_DRV_STATE_UNINITIALIZED;
}

void nrfx_ipc_receive_event_enable(uint8_t event_index)
{
    NRFX_ASSERT(m_ipc_cb.state == NRFX_DRV_STATE_INITIALIZED);
    nrf_ipc_int_enable(NRF_IPC_NS, (1UL &amp;lt;&amp;lt; event_index));
}

void nrfx_ipc_receive_event_disable(uint8_t event_index)
{
    NRFX_ASSERT(m_ipc_cb.state == NRFX_DRV_STATE_INITIALIZED);
    nrf_ipc_int_disable(NRF_IPC_NS, (1UL &amp;lt;&amp;lt; event_index));
}

void nrfx_ipc_receive_event_group_enable(uint32_t event_bitmask)
{
    NRFX_ASSERT(m_ipc_cb.state == NRFX_DRV_STATE_INITIALIZED);
    nrf_ipc_int_enable(NRF_IPC_NS, event_bitmask);
}

void nrfx_ipc_receive_event_group_disable(uint32_t event_bitmask)
{
    NRFX_ASSERT(m_ipc_cb.state == NRFX_DRV_STATE_INITIALIZED);
    nrf_ipc_int_disable(NRF_IPC_NS, event_bitmask);
}

void nrfx_ipc_receive_event_channel_assign(uint8_t event_index, uint8_t channel_index)
{
    NRFX_ASSERT(channel_index &amp;lt; IPC_CH_NUM);
    uint32_t channel_bitmask = (1UL &amp;lt;&amp;lt; channel_index);
    channel_bitmask |= nrf_ipc_receive_config_get(NRF_IPC_NS, event_index);
    nrf_ipc_receive_config_set(NRF_IPC_NS, event_index, channel_bitmask);
}

void nrfx_ipc_send_task_channel_assign(uint8_t send_index, uint8_t channel_index)
{
    NRFX_ASSERT(channel_index &amp;lt; IPC_CH_NUM);
    uint32_t channel_bitmask = (1UL &amp;lt;&amp;lt; channel_index);
    channel_bitmask |= nrf_ipc_send_config_get(NRF_IPC_NS, send_index);
    nrf_ipc_send_config_set(NRF_IPC_NS, send_index, channel_bitmask);
}

void nrfx_ipc_irq_handler(void)
{
    // Get the information about events that fire this interrupt
    uint32_t events_map = nrf_ipc_int_pending_get(NRF_IPC_NS);
    // Clear these events
    uint32_t bitmask = events_map;

    while (bitmask)
    {
        uint8_t event_idx = __CLZ(__RBIT(bitmask)); //NRF_CTZ(bitmask);
        bitmask &amp;amp;= ~(1UL &amp;lt;&amp;lt; event_idx);
        nrf_ipc_event_clear(NRF_IPC_NS, nrf_ipc_receive_event_get(event_idx));
#if NRFX_CHECK(NRFX_CONFIG_API_VER_2_10)
        if (m_ipc_cb.handler)
        {
            m_ipc_cb.handler(event_idx, m_ipc_cb.p_context);
        }
#elif NRFX_CHECK(NRFX_CONFIG_API_VER_2_9)
    }
    if (m_ipc_cb.handler)
    {
        m_ipc_cb.handler(events_map, m_ipc_cb.p_context);
#endif
    }
}

//#endif // NRFX_CHECK(NRFX_IPC_ENABLED)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/409369?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2023 13:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abb35f65-a14e-494e-8d11-7cef1eef19be</guid><dc:creator>emdi</dc:creator><description>&lt;p&gt;You must use nrfx 2.10 with libmodem version 2.2.1 and later.&lt;/p&gt;
&lt;p&gt;The code you pasted from nrfx looks like v2.9. Also you need a #define to let nrfx v2.10 enable the v2.10 API:&amp;nbsp;NRFX_CONFIG_API_VER_2_10&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/409153?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 12:41:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:217ebfe2-fa51-45ba-adbc-e429dfddfc54</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;I have now downloaded version 2.2.0 of sdk-nrfxlib (that contains version 2.2.1 of the modem library), changed the Makefile to use the newer version and updated &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os.c&lt;/span&gt; and &lt;span style="font-family:courier new, courier;"&gt;defs.h&lt;/span&gt; as well. All other files are as before.&lt;br /&gt;&lt;br /&gt;Anything related to the &lt;span style="font-family:courier new, courier;"&gt;EGU1&lt;/span&gt; interrupt has been removed from my &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os.c&lt;/span&gt;, including the functions &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_application_irq_set()&lt;/span&gt; and &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_application_irq_clear()&lt;/span&gt; that are not needed anymore. Since &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_platform.h&lt;/span&gt; does not exist in the newer version of the modem library, I had to make some changes to &lt;span style="font-family:courier new, courier;"&gt;defs.h&lt;/span&gt; so that &lt;span style="font-family:courier new, courier;"&gt;NRF_MODEM_NETWORK_IRQ_PRIORITY&lt;/span&gt; is defined. This is set to 0 as before.&lt;br /&gt;&lt;br /&gt;Lastly, I have updated the modem firmware from version 1.3.3 to 1.3.4 as required in the changelog for version 2.2.1 of the modem library.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The changes did not make it work. I believe it is the same exact problem as before, where &lt;/strong&gt;&lt;span style="font-family:courier new, courier;"&gt;nrf_modem_init()&lt;/span&gt;&lt;strong&gt; is stuck in a loop involving &lt;/strong&gt;&lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_timedwait()&lt;/span&gt;&lt;strong&gt;, and some RPC/IPC related functions inside the modem library. It still does not return.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Below is an output from GDB where I break the execution a few times to see where it is stuck:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Target interface speed set to 2000 kHz
Flash download enabled
Loading section .sec1, size 0xa74 lma 0x0
Loading section .sec2, size 0x29a0 lma 0x10000
Start address 0x0, load size 13332
Transfer rate: 106656 bits in &amp;lt;1 sec, 6666 bytes/write.
Breakpoint 1 at 0x7d4: main. (2 locations)
Resets core &amp;amp; peripherals via SYSRESETREQ &amp;amp; VECTRESET bit.

Breakpoint 1, main () at boot/main.c:9
9	{
(gdb) continue
Continuing.

Breakpoint 1, main () at app/main.c:68
68	{
(gdb) continue
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:103
103	{
(gdb) where
#0  nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:103
#1  0x00010fdc in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:535
#2  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#3  0x00010c40 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#4  0x00010aca in nrf_modem_platform_init (params=0x125c8 &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#5  nrf_modem_init (params=0x125c8 &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#6  0x00010a22 in main () at app/main.c:80
#7  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) continue
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00010756 in nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:142
142	    if (k == 0)
(gdb) where
#0  0x00010756 in nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:142
#1  0x00010fdc in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:535
#2  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#3  0x00010c40 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#4  0x00010aca in nrf_modem_platform_init (params=0x125c8 &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#5  nrf_modem_init (params=0x125c8 &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#6  0x00010a22 in main () at app/main.c:80
#7  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) continue
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) where
#0  nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
#1  0x00010b60 in nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
#2  0x00010702 in nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
#3  0x00010fdc in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:535
#4  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#5  0x00010c40 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#6  0x00010aca in nrf_modem_platform_init (params=0x125c8 &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#7  nrf_modem_init (params=0x125c8 &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#8  0x00010a22 in main () at app/main.c:80
#9  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) continue
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00010fd4 in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) where
#0  0x00010fd4 in rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
#1  rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
#2  0x00010c40 in rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:117
#3  0x00010aca in nrf_modem_platform_init (params=0x125c8 &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:73
#4  nrf_modem_init (params=0x125c8 &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
#5  0x00010a22 in main () at app/main.c:80
#6  0x00010496 in _start ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The changed files are included below, as well as a longer GDB output where I do manual stepping like in my original question above.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;app/defs.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// DEFS header                                                  PVH, 2023-01-24
#ifndef DEFS_H
#define DEFS_H

// Define the addresses and sizes of the various regions in the shared memory
// for use with the nRF Modem Library. THIS SHOULD MATCH THE LINKER SCRIPT!!!
#define NRF_MODEM_SHMEM_CTRL_BASE  0x20010000
// NRF_MODEM_SHMEM_CTRL_SIZE is already set to 0x4e8 in nrf_modem.h
#define NRF_MODEM_SHMEM_TX_BASE    0x200104e8
#define NRF_MODEM_SHMEM_TX_SIZE    0x00004000
#define NRF_MODEM_SHMEM_RX_BASE    0x200144e8
#define NRF_MODEM_SHMEM_RX_SIZE    0x00002000
#define NRF_MODEM_SHMEM_TRACE_BASE 0x200164E8
#define NRF_MODEM_SHMEM_TRACE_SIZE 0x00000000

// This was defined in nrf_modem_platform.h that no longer exists in
// version 2.2.1 version of the modem library, so we define it here instead
#define NRF_MODEM_NETWORK_IRQ_PRIORITY 0

#include &amp;lt;nrf_modem.h&amp;gt;  // Definition of struct nrf_modem_fault_into

#ifdef __cplusplus
extern &amp;quot;C&amp;quot; {
#endif

// Definition of modem fault handler
void nrf_modem_fault_handler(struct nrf_modem_fault_info* fault_info);
const struct nrf_modem_init_params* nrf_modem_get_init_params();

#ifdef __cplusplus
}
#endif

#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;app/nrf_modem_os.c&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// NRF_MODEM_OS implementation                                  PVH, 2023-01-26
// Custom nrf_modem_os.c file that implements the functions defined in the
// nrf_modem_os.h header found in the sdk-nrfxlib
#include &amp;lt;nrf_modem.h&amp;gt;
#include &amp;lt;nrf_modem_os.h&amp;gt;
#include &amp;lt;nrfx_ipc.h&amp;gt; 
#include &amp;lt;nrf_errno.h&amp;gt;
#include &amp;lt;nrf.h&amp;gt;
#include &amp;quot;errno.h&amp;quot;

#include &amp;quot;defs.h&amp;quot;    // Constants and definition of fault handler function etc.
#include &amp;quot;delay.h&amp;quot;   // For use in nrf_modem_os_busywait()
#include &amp;quot;dyma.h&amp;quot;    // For dynamic memory allocation within the TX shared mem.
#include &amp;lt;stdlib.h&amp;gt;  // For malloc, free
#include &amp;lt;stdbool.h&amp;gt; // For bool

volatile bool nrf_modem_os_inside_isr;  // True while in ISR otherwise false
volatile bool nrf_modem_os_wakeup;  // Set true when a &amp;quot;thread&amp;quot; should wake up

static const struct nrf_modem_init_params init_params =
{
        .ipc_irq_prio = NRF_MODEM_NETWORK_IRQ_PRIORITY,
        .shmem.ctrl = {
                .base = NRF_MODEM_SHMEM_CTRL_BASE,
                .size = NRF_MODEM_SHMEM_CTRL_SIZE,
        },
        .shmem.tx = {
                .base = NRF_MODEM_SHMEM_TX_BASE,
                .size = NRF_MODEM_SHMEM_TX_SIZE,
        },
        .shmem.rx = {
                .base = NRF_MODEM_SHMEM_RX_BASE,
                .size = NRF_MODEM_SHMEM_RX_SIZE,
        },
        .shmem.trace = {
                .base = NRF_MODEM_SHMEM_TRACE_BASE,
                .size = NRF_MODEM_SHMEM_TRACE_SIZE,
        },
        .fault_handler = nrf_modem_fault_handler
};

const struct nrf_modem_init_params* nrf_modem_get_init_params()
{
    return &amp;amp;init_params;
}

void IPC_IRQHandler()
{
    nrf_modem_os_inside_isr = true;
    nrfx_ipc_irq_handler();
	nrf_modem_os_event_notify();
	nrf_modem_os_inside_isr = false;
}

void nrf_modem_os_init(void)
{
    /* Initialize the glue layer and required peripherals. */
   
    // Initialize dynamic memory allocation for the TX region in shared memory
    dyma_init((void*)NRF_MODEM_SHMEM_TX_BASE, NRF_MODEM_SHMEM_TX_SIZE);
    
    nrf_modem_os_inside_isr = false;
}

void nrf_modem_os_shutdown(void)
{
    /* Deinitialize the glue layer.
       When shutdown is called, all pending calls to nrf_modem_os_timedwait
       shall exit and return -NRF_ESHUTDOWN. */
}

void* nrf_modem_os_shm_tx_alloc(size_t bytes)
{
    /* Allocate a buffer on the TX area of shared memory. */
    return dyma_alloc((void*)NRF_MODEM_SHMEM_TX_BASE, bytes);
}

void nrf_modem_os_shm_tx_free(void* mem)
{
    /* Free a shared memory buffer in the TX area. */
    dyma_free(mem);
}

void* nrf_modem_os_alloc(size_t bytes)
{
    /* Allocate a buffer on the library heap. */
    return malloc(bytes);
}

void nrf_modem_os_free(void* mem)
{
    /* Free a memory buffer in the library heap. */
    free(mem);
}

void nrf_modem_os_busywait(int32_t usec)
{
    /* Busy wait for a given amount of microseconds. */
    delay_us(usec);
}

int32_t nrf_modem_os_timedwait(uint32_t context, int32_t* timeout)
{
    if (! nrf_modem_is_initialized())
    {
        return -NRF_ESHUTDOWN;
    }

    /* Put a thread to sleep for a specific time or until an event occurs.
       Wait for the timeout.
       All waiting threads shall be woken by nrf_modem_event_notify.
       A blind return value of zero will cause a blocking wait. */
       
    nrf_modem_os_wakeup = false;
    
    // Wait until a timeout of approximately *timeout milliseconds or until
    // woken up by nrf_modem_os_event_notify()
    volatile uint32_t k = *timeout*4000;
    if (*timeout &amp;lt; 0)
        k = 0xFFFFFFFFul;   // Not infinite but pretty long timeout
        
    while (k &amp;gt; 0)
    {
        // If nrf_modem_os_event_notify() is called, wake up and return
        // the remaining time in *timeout
        if (nrf_modem_os_wakeup)
        {
            nrf_modem_os_wakeup = false;
            *timeout = k / 4000;
            break;
        }
        
        // Countdown the time
        k--;
    }
    
    // Check if the modem has been uninitialized in the meantime
    if (! nrf_modem_is_initialized())
        return -NRF_ESHUTDOWN;
    
    // Check if while loop above was broken by a timeout
    if (k == 0)
        return -NRF_EAGAIN;

    return 0;
}

void nrf_modem_os_event_notify(void)
{
    /* Notify the application that an event has occurred.
       This shall wake all threads sleeping in nrf_modem_os_timedwait. */
       
    nrf_modem_os_wakeup = true;
}

void nrf_modem_os_errno_set(int errno_val)
{
    /* Set OS errno. */
}

bool nrf_modem_os_is_in_isr(void)
{
    /* Check if executing in interrupt context. */
    return nrf_modem_os_inside_isr;
}

int nrf_modem_os_sem_init(void** sem, unsigned int initial_count, 
    unsigned int limit)
{
    /* The function shall allocate and initialize a semaphore and return its 
       address through the `sem` parameter. If an address of an already 
       allocated semaphore is provided as an input, the allocation part is 
       skipped and the semaphore is only reinitialized. */
    return 0;
}

void nrf_modem_os_sem_give(void* sem)
{
    /* Give a semaphore. */
}

int nrf_modem_os_sem_take(void* sem, int timeout)
{
    /* Try to take a semaphore with the given timeout. */
    return 0;
}

unsigned int nrf_modem_os_sem_count_get(void* sem)
{
    /* Get a semaphore&amp;#39;s count. */
    return 0;
}

void nrf_modem_os_log(int level, const char* fmt, ...)
{
    /* Generic logging procedure. */
    /*
    va_list ap;
    va_start(ap, fmt);
    vprintf(fmt, ap);
    printf(&amp;quot;\n&amp;quot;);
    va_end(ap);
    */
}

void nrf_modem_os_logdump(int level, const char* str, const void* data, 
    size_t len)
{
    /* Log hex representation of object. */
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Makefile&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Makefile for nRF9160 bare metal programming                 PVH, January 2023

# Arm GNU toolchain can be found here (look for gcc-arm-none-eabi)
# https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain
# nrfx is available at https://github.com/NordicSemiconductor/nrfx
# and the SDK at https://github.com/nrfconnect/sdk-nrfxlib
# CMSIS can be found at https://github.com/ARM-software/CMSIS_5


# Specify project name, build directory and linker script
TARGET = test
BUILDDIR = ./build
LDSCRIPT = app.ld
BOOTLDSCRIPT = boot.ld

# Paths to toolchain and SDK
TOOLSPATH = /opt/gcc-arm-none-eabi-9-2020-q2-update
CMSISPATH = /opt/CMSIS_5/CMSIS
NRFXPATH = /opt/nrfx-2.10.0
SDKPATH = /opt/sdk-nrfxlib-2.2.0

# Shortcuts for various tools
CC  = ${TOOLSPATH}/bin/arm-none-eabi-gcc
CPP = ${TOOLSPATH}/bin/arm-none-eabi-g++
AS  = ${TOOLSPATH}/bin/arm-none-eabi-g++
LD  = ${TOOLSPATH}/bin/arm-none-eabi-g++
DB  = ${TOOLSPATH}/bin/arm-none-eabi-gdb
OBJCOPY = ${TOOLSPATH}/bin/arm-none-eabi-objcopy
SIZETOOL = ${TOOLSPATH}/bin/arm-none-eabi-size
MERGEHEX = /opt/nrf-command-line-tools/bin/mergehex
NRFJPROG = /opt/nrf-command-line-tools/bin/nrfjprog

# List of source files for the application
SOURCES = \
    ${NRFXPATH}/mdk/gcc_startup_nrf9160.S \
    ${NRFXPATH}/mdk/system_nrf9160.c \
    app/dyma.c \
    app/delay.c \
    app/nrf_modem_os.c \
    app/nrfx_ipc.c \
    app/main.c \
    
# List of source files for the bootloader
BOOTSOURCES = \
    ${NRFXPATH}/mdk/gcc_startup_nrf9160.S \
    ${NRFXPATH}/mdk/system_nrf9160.c \
    boot/main.c

# List of include directories
INCLUDEDIRS = \
    ${CMSISPATH}/Core/Include \
    ${NRFXPATH} \
    ${NRFXPATH}/templates \
    ${NRFXPATH}/mdk \
    ${NRFXPATH}/hal \
    ${NRFXPATH}/drivers/include \
    ${SDKPATH}/nrf_modem/include

# Directories to search for libraries in the linking process
LDDIRS = \
    ${NRFXPATH}/mdk \
    $(SDKPATH)/nrf_modem/lib/cortex-m33/hard-float \
    
# Libraries for the application
LIBS = -lmodem -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group

# Libraries for the bootloader
BOOTLIBS = -Wl,--start-group -lgcc -lc -lnosys -Wl,--end-group

# Additional objects for the linker
LDOBJECTS =

# Common flags for CC, CPP, AS and LD
FLAGS = -mcpu=cortex-m33 -mthumb -mfloat-abi=hard -mabi=aapcs
FLAGS += -mfpu=fpv5-sp-d16 -DNRF9160_XXAA
FLAGS += -DCONFIG_GPIO_AS_PINRESET -DFLOAT_ABI_HARD

# Common flags for secure code
SFLAGS = -mcmse

# Common flags for non-secure code
NSFLAGS = -DNRF_TRUSTZONE_NONSECURE

# Flags for the C compiler
CFLAGS = ${FLAGS} -std=c99 -Wall

# Flags for the C++ compiler
CPPFLAGS = ${FLAGS} -std=c++11 -Wall

# Flags for the assembler
AFLAGS = ${FLAGS} -x assembler-with-cpp

# Linker flags
LDFLAGS = ${FLAGS} -T &amp;quot;$(LDSCRIPT)&amp;quot; -Xlinker
LDFLAGS += --gc-sections -Xlinker -Map=&amp;quot;$(BUILDDIR)/$(TARGET)_app.map&amp;quot; 
LDFLAGS += --specs=nano.specs

BOOTLDFLAGS = ${FLAGS} -T &amp;quot;$(BOOTLDSCRIPT)&amp;quot; -Xlinker
BOOTLDFLAGS += --gc-sections -Xlinker -Map=&amp;quot;$(BUILDDIR)/$(TARGET)_boot.map&amp;quot; 
BOOTLDFLAGS += --specs=nano.specs

# Check whether to optimize or build for debugging
DEBUG ?= 0
ifeq ($(DEBUG), 1)
	CFLAGS += -Og -g3 -gdwarf-2
	CPPFLAGS += -Og -g3 -gdwarf-2
	AFLAGS += -g3 -gdwarf-2
	LDFLAGS += -g3
else
	CFLAGS += -O3
	CPPFLAGS += -O3
endif

# Construct list of object files by appending the suffix .o to all source files
OBJECTS := $(addsuffix .o,$(SOURCES))

# Replace NRFX paths since objects here are going to be build in the build dir.
OBJECTS := $(subst $(NRFXPATH),app/nrfx,$(OBJECTS))
OBJECTS := $(subst $(SDKPATH),app/sdk-nrfxlib,$(OBJECTS))

# Finally, add build directory prefix
OBJECTS := $(addprefix $(BUILDDIR)/,$(OBJECTS))

# And we to the same to the bootloader
BOOTOBJECTS := $(addsuffix .o,$(BOOTSOURCES))
BOOTOBJECTS := $(subst $(NRFXPATH),boot/nrfx,$(BOOTOBJECTS))
BOOTOBJECTS := $(subst $(SDKPATH),boot/sdk-nrfxlib,$(BOOTOBJECTS))
BOOTOBJECTS := $(addprefix $(BUILDDIR)/,$(BOOTOBJECTS))

# Add -I prefix to INCLUDEDIRS and insert them into CFLAGS, CPPFLAGS and AFLAGS
CFLAGS := $(CFLAGS) $(addprefix -I,$(INCLUDEDIRS)) 
CPPFLAGS := $(CPPFLAGS) $(addprefix -I,$(INCLUDEDIRS))
AFLAGS := $(AFLAGS) $(addprefix -I,$(INCLUDEDIRS)) 

# Add -L prefix to LDDIRS and and insert them into LDFLAGS along with LIBS
LDFLAGS := $(addprefix -L,$(LDDIRS)) $(LIBS) $(LDFLAGS)
BOOTLDFLAGS := $(addprefix -L,$(LDDIRS)) $(BOOTLIBS) $(BOOTLDFLAGS)

all: $(BUILDDIR)/$(TARGET).hex

$(BUILDDIR)/$(TARGET).hex: $(BUILDDIR)/$(TARGET)_boot.axf $(BUILDDIR)/$(TARGET)_app.axf
	@echo &amp;quot;[MERGEHEX] $^ -&amp;gt; $@&amp;quot;
	@$(MERGEHEX) -m $^ -o $@
	@echo &amp;quot;[OBJCOPY] $@ -&amp;gt; $(BUILDDIR)/$(TARGET).bin&amp;quot;
	@objcopy -I ihex -O binary $@ $(BUILDDIR)/$(TARGET).bin
	
$(BUILDDIR)/$(TARGET)_boot.axf: $(BOOTOBJECTS)
	@echo &amp;quot;[LD] Linking boot image $@&amp;quot;
	@$(LD) $(BOOTLDFLAGS) -o $@ $(BOOTOBJECTS) $(LIBS)
	@echo &amp;quot;[OBJCOPY] $@ -&amp;gt; $(BUILDDIR)/$(TARGET)_boot.hex&amp;quot;
	@objcopy -O ihex $@ $(BUILDDIR)/$(TARGET)_boot.hex
	@echo &amp;quot;[OBJCOPY] $@ -&amp;gt; $(BUILDDIR)/$(TARGET)_boot.bin&amp;quot;
	@objcopy -I ihex -O binary $(BUILDDIR)/$(TARGET)_boot.hex $(BUILDDIR)/$(TARGET)_boot.bin
	@$(SIZETOOL) $@
	
$(BUILDDIR)/$(TARGET)_app.axf: $(OBJECTS) 
	@echo &amp;quot;[LD] Linking app image $@&amp;quot;
	@$(LD) $(LDFLAGS) -DNRF_TRUSTZONE_NONSECURE -o $@ $(OBJECTS) $(LIBS)
	@echo &amp;quot;[OBJCOPY] $@ -&amp;gt; $(BUILDDIR)/$(TARGET)_app.hex&amp;quot;
	@objcopy -O ihex $@ $(BUILDDIR)/$(TARGET)_app.hex
	@echo &amp;quot;[OBJCOPY] $@ -&amp;gt; $(BUILDDIR)/$(TARGET)_app.bin&amp;quot;
	@objcopy -I ihex -O binary $(BUILDDIR)/$(TARGET)_app.hex $(BUILDDIR)/$(TARGET)_app.bin
	@$(SIZETOOL) $@
	
# Recipe for building C objects in the bootloader
$(BUILDDIR)/boot/%.c.o: boot/%.c
	@echo &amp;quot;[CC] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	$(CC) $(SFLAGS) $(CFLAGS) -c $&amp;lt; -o $@

# Recipe for building C++ objects in the bootloader
$(BUILDDIR)/boot/%.cpp.o: boot/%.cpp
	@echo &amp;quot;[CPP] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(CPP) $(SFLAGS) $(CPPFLAGS) -c $&amp;lt; -o $@

# Recipe for assembling objects in the bootloader
$(BUILDDIR)/boot/%.S.o: /boot/%.S
	@echo &amp;quot;[AS] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(AS) $(SFLAGS) $(AFLAGS) -c $&amp;lt; -o $@

# Recipe for building C objects in $(NRFXPATH) for the bootloader
$(BUILDDIR)/boot/nrfx/%.c.o: $(NRFXPATH)/%.c
	@echo &amp;quot;[CC] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(CC) $(SFLAGS) $(CFLAGS) -c $&amp;lt; -o $@

# Recipe for assembling objects in $(NRFXPATH) for the bootloader
$(BUILDDIR)/boot/nrfx/%.S.o: $(NRFXPATH)/%.S
	@echo &amp;quot;[AS] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(AS) $(SFLAGS) $(AFLAGS) -c $&amp;lt; -o $@

# Recipe for building C objects in the application
$(BUILDDIR)/app/%.c.o: app/%.c
	@echo &amp;quot;[CC] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(CC) $(NSFLAGS) $(CFLAGS) -c $&amp;lt; -o $@
	
# Recipe for building C++ objects in the application
$(BUILDDIR)/app/%.cpp.o: app/%.cpp
	@echo &amp;quot;[CPP] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(CPP) $(NSFLAGS) $(CPPFLAGS) -c $&amp;lt; -o $@

# Recipe for assembling objects in the application
$(BUILDDIR)/app/%.S.o: app/%.S
	@echo &amp;quot;[AS] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(AS) $(NSFLAGS) $(AFLAGS) -c $&amp;lt; -o $@

# Recipe for building C objects in $(NRFXPATH) for the application
$(BUILDDIR)/app/nrfx/%.c.o: $(NRFXPATH)/%.c
	@echo &amp;quot;[CC] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(CC) $(NSFLAGS) $(CFLAGS) -c $&amp;lt; -o $@

# Recipe for assembling objects in $(NRFXPATH) for the application
$(BUILDDIR)/app/nrfx/%.S.o: $(NRFXPATH)/%.S
	@echo &amp;quot;[AS] $&amp;lt; -&amp;gt; $@&amp;quot;
	@mkdir -p $(@D)
	@$(AS) $(NSFLAGS) $(AFLAGS) -c $&amp;lt; -o $@

.PHONY: clean flash erase debug

# Remove all build files
clean:
	@echo &amp;quot;Removing $(BUILDDIR)&amp;quot;
	@rm -dfr $(BUILDDIR)
	
# Flash the program
flash: $(BUILDDIR)/$(TARGET).hex
	@echo Flashing $(BUILDDIR)/$(TARGET).hex
	@$(NRFJPROG) -f nrf91 --program $(BUILDDIR)/$(TARGET).hex --sectorerase \
	--verify --reset

# Erase all flash
erase:
	@echo Erasing all flash
	@$(NRFJPROG) -f nrf91 --eraseall

# Shortcut for debugging
debug: $(BUILDDIR)/$(TARGET).hex
	@echo &amp;quot;Run /opt/SEGGER/JLink/JLinkGDBServerCLExe -device nrf9160_xxaa -if swd -port 2331&amp;quot;
	@$(DB) -x gdb_cmds.txt
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Long GDB output with manual stepping&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Target interface speed set to 2000 kHz
Flash download enabled
Loading section .sec1, size 0xa74 lma 0x0
Loading section .sec2, size 0x29a0 lma 0x10000
Start address 0x0, load size 13332
Transfer rate: 106656 bits in &amp;lt;1 sec, 6666 bytes/write.
Breakpoint 1 at 0x7d4: main. (2 locations)
Resets core &amp;amp; peripherals via SYSRESETREQ &amp;amp; VECTRESET bit.

Breakpoint 1, main () at boot/main.c:9
9	{
(gdb) break app/nrf_modem_os.c:62
Breakpoint 2 at 0x106b4: file app/nrf_modem_os.c, line 62.
(gdb) continue
Continuing.

Breakpoint 1, main () at app/main.c:68
68	{
(gdb) continue
Continuing.

Breakpoint 2, nrf_modem_os_init () at app/nrf_modem_os.c:62
62	    nrf_modem_os_inside_isr = false;
(gdb) step
nrf_modem_init (params=0x125c8 &amp;lt;init_params&amp;gt;, mode=mode@entry=NORMAL_MODE) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
237	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_platform_init (params=0x125c8 &amp;lt;init_params&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:237
237	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c
(gdb) step
73	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c
(gdb) step
rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:111
111	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c: No such file or directory.
(gdb) step
nrf_modem_os_sem_init (sem=sem@entry=0x200184d0 &amp;lt;rpc_ready_sem&amp;gt;, initial_count=initial_count@entry=0, limit=limit@entry=1) at app/nrf_modem_os.c:174
174	    return 0;
(gdb) step
rpc_init (init_param=init_param@entry=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c:112
112	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c: No such file or directory.
(gdb) step
117	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/framework/rpc_framework.c
(gdb) step
rpc_transport_init (init_param=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/rpc_transport.c:47
47	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/rpc_transport.c: No such file or directory.
(gdb) step
rpc_transport_ipc_init (init_param=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:683
683	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
nrfx_ipc_init (irq_priority=0 &amp;#39;\000&amp;#39;, handler=handler@entry=0x1110d &amp;lt;ipc_irq_handler&amp;gt;, p_context=p_context@entry=0x0 &amp;lt;__isr_vector&amp;gt;) at app/nrfx_ipc.c:59
59	    if (m_ipc_cb.state != NRFX_DRV_STATE_UNINITIALIZED)
(gdb) step
65	    NVIC_SetPriority(IPC_IRQn, irq_priority);
(gdb) step
__NVIC_SetPriority (priority=0, IRQn=IPC_IRQn) at /opt/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2591
2591	    NVIC-&amp;gt;IPR[((uint32_t)IRQn)]               = (uint8_t)((priority &amp;lt;&amp;lt; (8U - __NVIC_PRIO_BITS)) &amp;amp; (uint32_t)0xFFUL);
(gdb) step
nrfx_ipc_init (irq_priority=&amp;lt;optimized out&amp;gt;, handler=handler@entry=0x1110d &amp;lt;ipc_irq_handler&amp;gt;, p_context=p_context@entry=0x0 &amp;lt;__isr_vector&amp;gt;) at app/nrfx_ipc.c:67
67	    NVIC_EnableIRQ(IPC_IRQn);
(gdb) step
__NVIC_EnableIRQ (IRQn=IPC_IRQn) at /opt/CMSIS_5/CMSIS/Core/Include/core_cm33.h:2395
2395	    NVIC-&amp;gt;ISER[(((uint32_t)IRQn) &amp;gt;&amp;gt; 5UL)] = (uint32_t)(1UL &amp;lt;&amp;lt; (((uint32_t)IRQn) &amp;amp; 0x1FUL));
(gdb) step
nrfx_ipc_init (irq_priority=&amp;lt;optimized out&amp;gt;, handler=handler@entry=0x1110d &amp;lt;ipc_irq_handler&amp;gt;, p_context=p_context@entry=0x0 &amp;lt;__isr_vector&amp;gt;) at app/nrfx_ipc.c:69
69	    m_ipc_cb.state = NRFX_DRV_STATE_INITIALIZED;
(gdb) step
70	    m_ipc_cb.handler = handler;
(gdb) step
71	    m_ipc_cb.p_context = p_context;
(gdb) step
73	    return NRFX_SUCCESS;
(gdb) step
rpc_transport_ipc_init (init_param=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:685
685	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
709	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=0, index=0 &amp;#39;\000&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=2, index=1 &amp;#39;\001&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=0, index=2 &amp;#39;\002&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=8, index=3 &amp;#39;\003&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=0, index=4 &amp;#39;\004&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=32, index=5 &amp;#39;\005&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=0, index=6 &amp;#39;\006&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
84	        nrf_ipc_send_config_set(NRF_IPC_NS, i, p_config-&amp;gt;send_task_config[i]);
(gdb) step
nrf_ipc_send_config_set (channels_mask=0, index=7 &amp;#39;\a&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:444
444	    p_reg-&amp;gt;SEND_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:82
82	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=1, index=0 &amp;#39;\000&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=0, index=1 &amp;#39;\001&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=4, index=2 &amp;#39;\002&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=0, index=3 &amp;#39;\003&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=16, index=4 &amp;#39;\004&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=0, index=5 &amp;#39;\005&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=64, index=6 &amp;#39;\006&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
89	        nrf_ipc_receive_config_set(NRF_IPC_NS, i, 
(gdb) step
nrf_ipc_receive_config_set (channels_mask=128, index=7 &amp;#39;\a&amp;#39;, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:456
456	    p_reg-&amp;gt;RECEIVE_CNF[index] = channels_mask;
(gdb) step
nrfx_ipc_config_load (p_config=p_config@entry=0x2003df5c) at app/nrfx_ipc.c:87
87	    for (i = 0; i &amp;lt; IPC_CONF_NUM; ++i)
(gdb) step
93	    nrf_ipc_int_enable(NRF_IPC_NS, p_config-&amp;gt;receive_events_enabled);
(gdb) step
nrf_ipc_int_enable (mask=213, p_reg=0x4002a000) at /opt/nrfx-2.10.0/hal/nrf_ipc.h:396
396	    p_reg-&amp;gt;INTENSET = mask;
(gdb) step
rpc_transport_ipc_init (init_param=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:711
711	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
rpc_transport_ipc_shmem_init (cfg=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:711
711	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
573	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
579	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
__memset_ichk (len=1256, src=0, dst=0x20010000) at /tools/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/ssp/string.h:86
86	/tools/ncs/toolchains/v2.1.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/ssp/string.h: No such file or directory.
(gdb) step
rpc_transport_ipc_shmem_init (cfg=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:584
584	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
585	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
587	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
588	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
591	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
597	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_shmem_init (cfg=0x2003dfd8) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:632
632	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
634	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
641	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
642	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
643	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
644	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
645	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
652	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:653
653	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_shmem_init (cfg=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:671
671	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrfx_ipc_gpmem_set (data=536936448, mem_index=0 &amp;#39;\000&amp;#39;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:671
671	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_ipc_gpmem_set (data=536936448, index=0 &amp;#39;\000&amp;#39;, p_reg=0x4002a000) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/modules/hal/nordic/nrfx/hal/nrf_ipc.h:470
470	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/modules/hal/nordic/nrfx/hal/nrf_ipc.h: No such file or directory.
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:716
716	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
717	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_reset_clear () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:532
532	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_reset_clear () at ../../../include/nrf_modem_control.h:67
67	../../../include/nrf_modem_control.h: No such file or directory.
(gdb) step
70	in ../../../include/nrf_modem_control.h
(gdb) step
71	in ../../../include/nrf_modem_control.h
(gdb) step
75	in ../../../include/nrf_modem_control.h
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:533
533	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) step
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
533	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) step
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
533	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) step
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
533	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) step
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
533	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) step
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
533	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) step
nrf_modem_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c:279
279	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem.c: No such file or directory.
(gdb) step
nrf_modem_state_is_initialized () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c:23
23	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/platform/nrf_modem_state.c: No such file or directory.
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:536
536	/jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c: No such file or directory.
(gdb) step
533	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_init (init_param=&amp;lt;optimized out&amp;gt;) at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:719
719	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
rpc_transport_ipc_handshake () at /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c:534
534	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
535	in /jenkins_workspace/workspace/_nrfconnect-libmodem_v2.2-branch/libmodem/rpc/transport/ipc/rpc_transport_ipc.c
(gdb) step
nrf_modem_os_timedwait (context=context@entry=0, timeout=timeout@entry=0x2003df54) at app/nrf_modem_os.c:104
104	    if (! nrf_modem_is_initialized())
(gdb) 
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/408183?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2023 07:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38cfeaae-5ab9-4dd2-ab0f-afa7ad14c70d</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Thank you for making this clear. I was quite confused, but now it makes sense. I should have paid more attention to the changelog :-)&lt;/p&gt;
&lt;p&gt;I am going to try version 2.2.1 of the modem library and change the code accordingly - then I will post the result here, hopefully within a few days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/408077?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 16:53:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ddcc6e4-9b2f-42c0-a0b9-badbaea2e4fe</guid><dc:creator>Didrik Rokhaug</dc:creator><description>[quote user="PVH"]I am supposed to download the &lt;em&gt;main branch&lt;/em&gt; instead of the &lt;em&gt;latest release&lt;/em&gt;?[/quote]
&lt;p&gt;Correct. The &amp;quot;latest&amp;quot; or x.y.99 version of the documentation is taken from the main branch of the respective repositories.&lt;/p&gt;
&lt;p&gt;The most recent version of the modem lib (&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-2-2-1"&gt;2.2.1&lt;/a&gt;) is the one that is documented in the &amp;quot;online&amp;quot; documentation.&lt;/p&gt;
&lt;p&gt;Particularly, there were some big changes in how modem_lib v2.2.0 works, which interrupts it uses, etc.: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-2-2-0"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_modem/doc/CHANGELOG.html#nrf-modem-2-2-0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So some of the documentation you feel is &amp;quot;missing&amp;quot;, is simply not necessary anymore, with the most recent versions of the modem_lib.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Looking at the history of releases, 2.1.3 was released after 2.2.0, hence why Github thins it is the latest: &lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/releases"&gt;https://github.com/nrfconnect/sdk-nrfxlib/releases&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/407330?ContentTypeID=1</link><pubDate>Tue, 31 Jan 2023 12:56:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84ef3d4e-1506-4415-a51c-09fd156ab327</guid><dc:creator>PVH</dc:creator><description>&lt;p&gt;Yes, of course - thank you very much for looking into this :-)&lt;br /&gt;&lt;br /&gt;Regarding the documentation, it appears that the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_modem/doc/ug_nrf_modem_porting_os.html"&gt;online documentation&lt;/a&gt; (version&amp;nbsp;2.2.99) is identical to the .rst files found in the &lt;em&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/main/nrf_modem/doc/ug_nrf_modem_porting_os.rst"&gt;main branch&lt;/a&gt; of the GitHub repository&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;However, the documentation I get when I download the &lt;em&gt;latest release&lt;/em&gt; (&lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/releases/tag/v2.1.3"&gt;version 2.1.3&lt;/a&gt;) is more comprehensive and &amp;quot;complete&amp;quot; compared to the online documentation.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The documentation in the &lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/blob/v2.1-branch/nrf_modem/doc/ug_nrf_modem_porting_os.rst"&gt;v2.1-branch&lt;/a&gt; appears identical or at least very similar to the one I get when I download the 2.1.3 release. I refer to this version as the &amp;quot;offline documentation&amp;quot; below.&lt;br /&gt;&lt;br /&gt;I have listed some of the major and important differences here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No mentioning of the &lt;span style="font-family:courier new, courier;"&gt;EGU1&lt;/span&gt; interrupt at all in the online documentation&lt;/li&gt;
&lt;li&gt;The functions &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_application_irq_set()&lt;/span&gt; and &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_application_irq_clear()&lt;/span&gt; are not listed in the section &lt;em&gt;Specification&lt;/em&gt; and are not shown in the &lt;em&gt;Template&lt;/em&gt; section either&lt;/li&gt;
&lt;li&gt;The Initialization sequence diagram is more detailed in the offline documentation and shows how to configure the &lt;span style="font-family:courier new, courier;"&gt;EGU1&lt;/span&gt; interrupt - the online version does not.&lt;/li&gt;
&lt;li&gt;The Timedwait message sequence diagram shown in &lt;em&gt;2. Handling a timeout or sleep&lt;/em&gt; is also different. For example, the &lt;span style="font-family:courier new, courier;"&gt;IPC&lt;/span&gt; interrupt is indicated in the diagram in the online documentation, but the offline version shows the &lt;span style="font-family:courier new, courier;"&gt;EGU1&lt;/span&gt; interrupt instead.&lt;/li&gt;
&lt;li&gt;The offline documentation includes an extra sequence diagram labeled &lt;em&gt;Event handling, lowering priority&lt;/em&gt; that is not shown in the online documentation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Perhaps the &lt;span style="font-family:courier new, courier;"&gt;nrf_modem_os_application_irq&lt;/span&gt; functions and the &lt;span style="font-family:courier new, courier;"&gt;EGU1&lt;/span&gt; interrupt are no longer needed in version 2.2.99 (the main branch?), and I am supposed to download the &lt;em&gt;main branch&lt;/em&gt; instead of the &lt;em&gt;latest release&lt;/em&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160: Porting the modem library to work with bare metal application</title><link>https://devzone.nordicsemi.com/thread/407165?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2023 16:20:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2d5db01-d6fd-4385-af6a-464f45a3f815</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll need a bit more time to look into this.&lt;/p&gt;
&lt;p&gt;In the mean time, could you explain what you think is outdated with the documentation?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>