<?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>Jumping Between Applications</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26617/jumping-between-applications</link><description>hey guys i want to implement two separate application programs on the same chip. 
 Say Application1 is stored in address start_address1 to end_address2 and Application2 is stored in address start_address2 to end_address2. 
 can i just directly jump</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Jul 2022 08:20:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26617/jumping-between-applications" /><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/379252?ContentTypeID=1</link><pubDate>Fri, 29 Jul 2022 08:20:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eed4b29-427a-4fd7-a3b0-0b37fa7f9105</guid><dc:creator>AnhLe</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;br /&gt;Thanks for your reply, I think I don&amp;#39;t need to change the vector_table_base anymore I only need to put the new application to the application start address that match the&amp;nbsp;memory layout (for s140 is 0x27000) so I think it will be fine.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;AnhLe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/378676?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 10:33:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a30296f-ac57-44db-b8b3-32e8a94777bb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hai Anh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;sd_softdevice_vector_table_base_set() should only be called in a bootloader. Unless you start your application as a bootloader (by writing the address to UICR /MBR ), you won&amp;#39;t be able to use the function if the softdevice already started by the MBR.&amp;nbsp;&lt;br /&gt;Please create a new case if you have follow up questions.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/378609?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2022 03:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcaa568e-8653-4ac6-8b7e-c20586af90a0</guid><dc:creator>AnhLe</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;br /&gt;In case of not using softdevice is there anyway that I could change the vector table ????(&amp;nbsp;I mean the softdevice and mbr are still there but I don&amp;#39;t want to use the softdevice api)&lt;br /&gt;I&amp;#39;m thinking like after jumping to application and the application will do the&amp;nbsp;&lt;span&gt;sd_softdevice_vector_table_base_set.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/174623?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 15:27:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2addec44-fda2-4608-81df-4aaf81a6593e</guid><dc:creator>Wasil</dc:creator><description>&lt;p&gt;Hi Ashlesh,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am struggling with s322 and DFU. Can you tell me what should be the target settings? I can debug that after after dfu it say jumping to : 0x0029000 but doesn&amp;#39;t start application. Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104729?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2017 09:41:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d6540d9-561e-4b87-9979-740b775915de</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi AmbystomaLabs,
The main vector table is still point into the softdevice vector table. Normally the softdevice will forward those interrupt that&amp;#39;s available to the application to the application vector table, which is located at the start address of the application. sd_softdevice_vector_table_base_set() can change that and change the forward address to the address set in the call. Using this you can branch directly to the reset handler of the 2nd application you want to run.&lt;/p&gt;
&lt;p&gt;This is the same mechanism we used to jump from application to bootloader and vice versa in our legacy bootloader. (Check bootloader_app_start() function in the bootloader or bootloader_start() in buttonless application  in SDK v11)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104728?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2017 17:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:338dda66-c166-4919-9566-6e888662cd71</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;Everyone has been discussing whether or not the vector tables work out.&lt;/p&gt;
&lt;p&gt;So just to be clear, you are saying that Ashlesh can call sd_softdevice_vector_table_base_set(SECOND_APP_START);
Then do a software driven reset and everything will work out, correct?&lt;/p&gt;
&lt;p&gt;It looked to me that all the ISR vectors are driven off of offsets from the base application start.  But, if anything isn&amp;#39;t driven from an offset and is instead set to an actual address then this method won&amp;#39;t work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104727?ContentTypeID=1</link><pubDate>Tue, 07 Nov 2017 12:26:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1463b90e-0e52-4f2d-8dad-0f5038fc191e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Yes, you can do that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104726?ContentTypeID=1</link><pubDate>Mon, 06 Nov 2017 20:18:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37e81a25-e713-437a-a337-58548ae5838e</guid><dc:creator>Ashlesh</dc:creator><description>&lt;p&gt;dear , yes i am using a softdevice(s332)  and also a DFU. so basically i can use the same function the bootloader uses to jump to the application for my application ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104725?ContentTypeID=1</link><pubDate>Mon, 06 Nov 2017 14:57:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7944551-73f6-463f-a043-558f650dbcc5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Ashlesh: Please provide more information that you use the softdevice or not. If you use softdevice, you can refer to our bootloader example in the SDK for a reference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104732?ContentTypeID=1</link><pubDate>Mon, 06 Nov 2017 14:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49650c13-e3fd-4c2f-a00c-efb7f6ecbc46</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Turbo: However it&amp;#39;s possible to tell the softdevice to forward the interrupts to the application vector table using sd_softdevice_vector_table_base_set()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104731?ContentTypeID=1</link><pubDate>Sun, 05 Nov 2017 16:04:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85e95f8e-ed08-495b-9853-a10a74c4a16a</guid><dc:creator>Turbo J</dc:creator><description>&lt;blockquote&gt;
&lt;p&gt;can i just directly jump to one application to another&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;But the softdevice and interrupts can make this task a lot more difficult - only the first application will handle interrupts by default, and you cannot simply set VTOR (the vector table offset register) to another address once the softdevice is running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jumping Between Applications</title><link>https://devzone.nordicsemi.com/thread/104730?ContentTypeID=1</link><pubDate>Sun, 05 Nov 2017 15:58:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a22b4bf8-3b42-4bda-82b8-374c06445116</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;The nRF devices just have ARM processors at their core, so functionally you can always look up the opcode for moving the PC to where ever you want and put the opcode in your application code. In this manner, you can easily switch from one application to another.&lt;/p&gt;
&lt;p&gt;Based on the product spec they do not provide a way to permanently change the boot vector. Likely because this could get messy since the SD and MBR always sit at 0x0.&lt;/p&gt;
&lt;p&gt;I would suggest you just nestle the two applications together. In C this is pretty straightforward since most programs operate as a series of handlers calling various functions.
Having the programs together as one will make your life easier down the road as all the nordic apps are geared around 1 SD, 1 app, 1 DFU/bootloader.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t like the idea of putting them together in one C project, then concatenate them after compilation and just allocate the memory yourself using the ROM settings in the compiler.  Then it is still one app and the first app just switch boots to the second.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>