<?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>Bootloader usage for multiple applications switch</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35111/bootloader-usage-for-multiple-applications-switch</link><description>Hi, 
 I have read that bootloader can switch between two applications if programmed at different locations in flash by user. So how exactly bootloader knows to which application it should jump. 
 I am asking this question by taking reference from http</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 21 Sep 2018 08:49:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35111/bootloader-usage-for-multiple-applications-switch" /><item><title>RE: Bootloader usage for multiple applications switch</title><link>https://devzone.nordicsemi.com/thread/149781?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 08:49:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96c11ce3-8c02-481a-a08f-71dabdc1255a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Another similar case, with I think more detailed solution, covering with and without SD:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/33610/can-t-jump-to-a-custom-app-location-using-nrf_bootloader_app_start-with-sdk-v15"&gt;devzone.nordicsemi.com/.../can-t-jump-to-a-custom-app-location-using-nrf_bootloader_app_start-with-sdk-v15&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bootloader usage for multiple applications switch</title><link>https://devzone.nordicsemi.com/thread/134948?ContentTypeID=1</link><pubDate>Wed, 06 Jun 2018 12:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:283876d7-d8af-4ab8-a700-d335385e6ed3</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Jonnavittula,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;jumping between multiple applications is not something we support out of the box, but it is possible to modify the bootlaoder to do so.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The bootloader jumps to the location passed in the&amp;nbsp;nrf_bootloader_app_start_final() call in&amp;nbsp;nrf_bootloader_app_start() in nrf_bootloader_app_start.c. You can modify this address&amp;nbsp; so that the bootlaoder jumps to another location, i.e. another app.&amp;nbsp;Note:&amp;nbsp;you will also have to&amp;nbsp;&amp;nbsp;modify nrf_dfu_mbr_irq_forward_address_set() so that the interrupts are forwarded to the correct location.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void nrf_bootloader_app_start(void)
{
    uint32_t start_addr = MBR_SIZE; // Always boot from end of MBR. If a SoftDevice is present, it will boot the app.
    NRF_LOG_DEBUG(&amp;quot;Running nrf_bootloader_app_start with address: 0x%08x&amp;quot;, start_addr);
    uint32_t err_code;

    // Disable and clear interrupts
    // Notice that this disables only &amp;#39;external&amp;#39; interrupts (positive IRQn).
    NRF_LOG_DEBUG(&amp;quot;Disabling interrupts. NVIC-&amp;gt;ICER[0]: 0x%x&amp;quot;, NVIC-&amp;gt;ICER[0]);

    NVIC-&amp;gt;ICER[0]=0xFFFFFFFF;
    NVIC-&amp;gt;ICPR[0]=0xFFFFFFFF;
#if defined(__NRF_NVIC_ISER_COUNT) &amp;amp;&amp;amp; __NRF_NVIC_ISER_COUNT == 2
    NVIC-&amp;gt;ICER[1]=0xFFFFFFFF;
    NVIC-&amp;gt;ICPR[1]=0xFFFFFFFF;
#endif

    err_code = nrf_dfu_mbr_irq_forward_address_set();
    if (err_code != NRF_SUCCESS)
    {
        NRF_LOG_ERROR(&amp;quot;Failed running nrf_dfu_mbr_irq_forward_address_set()&amp;quot;);
    }

    NRF_LOG_FLUSH();
    nrf_bootloader_app_start_final(start_addr);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>