<?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>Combining two applications</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16724/combining-two-applications</link><description>I want to combine two applications, both of them having two services. One application resides at 0x16000 and other one resides at 0x249f0. I am using softdevice 7.3 and sdk 6. What I wanted to do is that, when I press one button it should to jump to the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Oct 2016 13:25:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16724/combining-two-applications" /><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63965?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2016 13:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7697f60b-b3e7-46fc-81b9-685a34e88265</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You also have to edit the &lt;code&gt;bootloader_app_start&lt;/code&gt;function, as the argument app_addr is not used, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void bootloader_app_start(uint32_t app_addr)
{
    // If the applications CRC has been checked and passed, the magic number will be written and we
    // can start the application safely.
    uint32_t err_code = sd_softdevice_disable();
    APP_ERROR_CHECK(err_code);

    interrupts_disable();

    err_code = sd_softdevice_vector_table_base_set(0x249f0);//CODE_REGION_1_START
    APP_ERROR_CHECK(err_code);

    bootloader_util_app_start(0x249f0);//CODE_REGION_1_START
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63966?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2016 13:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:962e32f5-d382-41f1-bf12-962b6ecba31d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Muckesh,
you need to replace &lt;code&gt;DFU_BANK_0_REGION_START&lt;/code&gt; with 0x249f0 in the two if statements before  NVIC_SystemReset() in main, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  if (dfu_start || (!bootloader_app_is_valid(0x249f0)))
    {
        nrf_gpio_pin_clear(UPDATE_IN_PROGRESS_LED);

        // Initiate an update of the firmware.
        err_code = bootloader_dfu_start();
        APP_ERROR_CHECK(err_code);

        nrf_gpio_pin_set(UPDATE_IN_PROGRESS_LED);
    }

    if (bootloader_app_is_valid(0x249f0) &amp;amp;&amp;amp; !bootloader_dfu_sd_in_progress())
    {
        // Select a bank region to use as application region.
        // @note: Only applications running from DFU_BANK_0_REGION_START is supported.
        bootloader_app_start(0x249f0);//DFU_BANK_0_REGION_START
    }
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63964?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2016 07:55:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:882af9b7-3c14-40cf-b706-e8b4758e1740</guid><dc:creator>mukesh</dc:creator><description>&lt;p&gt;Thank you again. Yes I set the address properly and the switching is working without the DFU. I mean if I upload the program with jprog. But with the dfu, it is getting back to DFU after calling the bootloader_app_start() function. What could be the reason for it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63963?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2016 07:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5c7ad10-2b1e-4701-b4da-4c5777f03c96</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Which start address did you set for the second application when you compiled it? Did you set 0x249F0 as the start address under &amp;quot;Options for Target&amp;quot; --&amp;gt; Target --&amp;gt; Read/Only Memory Areas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63962?ContentTypeID=1</link><pubDate>Sat, 01 Oct 2016 06:54:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:babcd811-e31c-4445-af89-1252b474425a</guid><dc:creator>mukesh</dc:creator><description>&lt;p&gt;I think the bootloader_util_app_start() function is resetting the device and it is going back to the  dfu mode. Is it possible to branch to different address other than 0x16000 from the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63959?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2016 09:57:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf67ebe6-c176-4755-aa9f-4b125a8fd33d</guid><dc:creator>mukesh</dc:creator><description>&lt;p&gt;I tried with mergehex. If I upload the merged hex file using nrfjprog, everything will work fine. That is the application switching is working fine. I but if I do the same with dfu, it won&amp;#39;t work. Instead of going to the second code region, it is going back to the dfu mode. I am using this function for doing the application switching 	&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t err_code = sd_softdevice_disable();
  APP_ERROR_CHECK(err_code);

  interrupts_disable();

  err_code = sd_softdevice_vector_table_base_set(0x249f0);
  APP_ERROR_CHECK(err_code);

  bootloader_util_app_start(0x249f0);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What would be the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63960?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2016 08:30:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44830f7d-6f2f-4c67-a806-3b3fbd04ae25</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You will have to update both applications at the time, i.e. merge the two applications to one firmware image and then perform the DFU.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63961?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2016 05:31:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44a829ae-8d96-4e71-a74c-65c5a2c4012a</guid><dc:creator>mukesh</dc:creator><description>&lt;p&gt;Thanks for the reply. My problem is still not solved. What I wanted to do is, I want to upload the two firmwares with different offset address using the dfu. What is happening is when I upload one firmware, the second one will get erased. I think the bootloader is erasing the entire application area before it does the firmware update. How can I solve this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining two applications</title><link>https://devzone.nordicsemi.com/thread/63958?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2016 11:02:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e405ed5-c748-4592-b975-e2163734c53b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Mukesh,&lt;/p&gt;
&lt;p&gt;I suggest that you take a look at &lt;a href="https://devzone.nordicsemi.com/question/94683/switching-between-apps-with-dual-bank/"&gt;this&lt;/a&gt; question and answer.&lt;/p&gt;
&lt;p&gt;-Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>