<?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>Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97817/jump-from-softdevice-to-application-a-or-b</link><description>We have an existing application for the NRF52840 using SDKv15. This application will handle writing a new application to a free bank. I need to add the ability to jump from SoftDevice to the new Application (A or B). Can I specify what address to jump</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Jul 2024 22:49:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97817/jump-from-softdevice-to-application-a-or-b" /><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/493999?ContentTypeID=1</link><pubDate>Mon, 15 Jul 2024 22:49:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e1f782d-256c-47c5-8d09-904aeb6414bf</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi marklander,&lt;/p&gt;
&lt;p&gt;If you want to understand the change to make nrf_dfu_mbr_irq_forward_address_set() support an &amp;quot;address&amp;quot; parameter, you will need to look into the thread that Einar linked in his very first reply here. It gives&amp;nbsp;the necessary context.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/492691?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 12:22:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b22129a2-4bc4-4dee-bda5-6a1f9718dfb1</guid><dc:creator>marklander</dc:creator><description>&lt;p&gt;Hi...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am in a similar situation...I have to jump not to sd 0x1000 start address, but to a specific address..&lt;/p&gt;
&lt;p&gt;I understand that basically I have to call this function:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;sd_softdevice_vector_table_base_set(startAddress)&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;with startaddress being my app address...&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I saw you commented 0x1000 in&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;nrf_dfu_mbr_irq_forward_address_set(MBR_SIZE)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Did I understand right?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the useful thread!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void nrf_bootloader_app_start(uint32_t startAddress)
{
    nrf_dfu_mbr_init_sd();

    // Disable and clear interrupts
    NVIC-&amp;gt;ICER[0] = 0xFFFFFFFF;
    NVIC-&amp;gt;ICPR[0] = 0xFFFFFFFF;
    NVIC-&amp;gt;ICER[1] = 0xFFFFFFFF;
    NVIC-&amp;gt;ICPR[1] = 0xFFFFFFFF;

    sd_softdevice_vector_table_base_set(startAddress);
    nrf_dfu_mbr_irq_forward_address_set(MBR_SIZE);
    nrf_bootloader_app_start_final(startAddress);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420809?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2023 14:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42f33686-d1ba-49cb-b8f6-61a1e4e310b0</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;Einar, thank you for being so responsive and thorough with your answers.&amp;nbsp; It helps considerably in understanding how the boot process works.&amp;nbsp; This is MUCH appreciated! Glad Nordic has experienced folks like you on the support team!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420611?ContentTypeID=1</link><pubDate>Sat, 15 Apr 2023 14:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92f0dcff-eeed-4f2f-82e9-2c431969d7b8</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am glad to hear you got it working!&lt;/p&gt;
[quote user="erk1313"]1) How should I set IAR to debug this while it jumps from bootloader to app A or AppB?[/quote]
&lt;p&gt;I must admit we don&amp;#39;t use IAR much, but generally most debuggers will start executing from the start address of the binary that is running, and that will not work when you have a bootloader (and not even a SoftDevice). As long as execution starts at 0 (starting with the MBR), I would assume it should be OK in that regard? (You have also the issue that the bootloader will check the hash of the application, so if you changed the&amp;nbsp;application you must also update the bootloader settings or modify the bootloader to not check the CRC, but this is regardless of the debugging environment you are using).&lt;/p&gt;
[quote user="erk1313"]2) Why does the bootloader code have data at 0x0000&amp;#39;0000, which conflicts with the MBR/SoftDevices S140 code?[/quote]
&lt;p&gt;This data is the bootloader start address, that the MBR check to know if there is a bootloader, and if so, where it is. In recent SDK versions, the bootloader hex file will contain the bootloader start address in the UICR&amp;nbsp;0x10001014, and on first boot, the, the MBR will copy it to address 0xFF8, which is in the end of the MBR page. However, a few SDK 15 minor versions had this in the MBR page itself in the hex file instead of the UICR. This caused problems, as if you for&amp;nbsp;instance program the MBR (typically with the SoftDevice) first, and then program the bootloader, the MBR would&amp;nbsp;typical be erase with the most common programing method, which is to do an erase of all sectors that are to be written to.&amp;nbsp;&lt;/p&gt;
[quote user="erk1313"]3) Where is the best place to put generic application data?&amp;nbsp;[/quote]
&lt;p&gt;That is right before (lower address) the bootlaoder. This is also where the FDS pages are located if you use FDS. The bootlaoder can be configured to never touch a specified amount of pages in this area, to prevent corrupting this data during DFU updates (when the area above the application can be used as a second slot to temporarily hold a new image. The relevant define here is&amp;nbsp;NRF_DFU_APP_DATA_AREA_SIZE in the bootloader&amp;#39;s sdk_config.h.&lt;/p&gt;
[quote user="erk1313"]4) If I wanted to use CRC checking, I assume I would need to generate bootloader settings and update the CRC there.&amp;nbsp; What other settings do I need to change in the code?[/quote]
&lt;p&gt;Yes, that is correct. CRC checking is the default so that is in use without you having to&amp;nbsp;change anything.&lt;/p&gt;
[quote user="erk1313"]5)&amp;nbsp;I&amp;#39;m a bit confused about the bootloader start address.&amp;nbsp; With my SDK, it seems that it is defined here:&amp;nbsp;[/quote]
&lt;p&gt;This goes back to my answer in 2). This is the bootloader start address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420550?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 14:44:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41d972c6-5c6f-453b-a84e-51d83cde94e6</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt;, a few questions I would like to ask:&lt;/p&gt;
&lt;p&gt;1) How should I set IAR to debug this while it jumps from bootloader to app A or AppB?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Combine both projects under the same Workspace&lt;/li&gt;
&lt;li&gt;Tell IAR that vector table is at the bootloader starting address: &lt;em&gt;drv_vector_table_base=0x000E0000&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Download the .out file as an extra image under Debugger?&amp;nbsp; (Perhaps this is just needed when using two separate workspaces)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2) Why does the bootloader code have data at 0x0000&amp;#39;0000, which conflicts with the MBR/SoftDevices S140 code?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1681483261925v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;3) Where is the best place to put generic application data?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1681483330764v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;4) If I wanted to use CRC checking, I assume I would need to generate bootloader settings and update the CRC there.&amp;nbsp; What other settings do I need to change in the code?&lt;/p&gt;
&lt;p&gt;5)&amp;nbsp;I&amp;#39;m a bit confused about the bootloader start address.&amp;nbsp; With my SDK, it seems that it is defined here:&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_UICR_BOOTLOADER_START_ADDRESS       (NRF_UICR_BASE + 0x14)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and it provides a symbol for IAR to write it to ICIR:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if defined (__CC_ARM )
    #pragma push
    #pragma diag_suppress 1296
    uint32_t  m_uicr_bootloader_start_address __attribute__((at(NRF_UICR_BOOTLOADER_START_ADDRESS)))
                                                    = BOOTLOADER_START_ADDR;
    #pragma pop
#elif defined ( __GNUC__ ) || defined ( __SES_ARM )
    volatile uint32_t m_uicr_bootloader_start_address  __attribute__ ((section(&amp;quot;.uicr_bootloader_start_address&amp;quot;)))
                                            = BOOTLOADER_START_ADDR;
#elif defined ( __ICCARM__ )
    __root    const uint32_t m_uicr_bootloader_start_address @ NRF_UICR_BOOTLOADER_START_ADDRESS
                                            = BOOTLOADER_START_ADDR;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, others have advised to write this start address using NRF tools:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --memwr 0xff8 --val 0x78000 // An example that does not use the correct address and value&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420549?ContentTypeID=1</link><pubDate>Fri, 14 Apr 2023 14:31:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45542e33-b40b-4766-994a-fc002847341b</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;Success!! Thanks for your help, Einar&lt;/p&gt;
&lt;p&gt;So far I have two applications loaded, neither of which start at the default address after the SoftDevices (not 0x0002&amp;#39;6000).&amp;nbsp; I can change &lt;span&gt;myStartAddress to determine which app to run.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Note! This applies to SDK15.0.0 and SoftDevices S140 v6.0.0.&amp;nbsp; I believe this is right before changes to where the start address of the bootloader is stored (from UCIR to MBR address).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I repurposed the example:&amp;nbsp;open_bootloader (pca10056_usb), though the bootloader does not transfer data so&amp;nbsp;I could have started from a blank slate.&lt;/p&gt;
&lt;p&gt;As your linked &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/130732"&gt;post&lt;/a&gt;&amp;nbsp;stated,,,&lt;/p&gt;
&lt;h3 id="mcetoc_1gu01po470"&gt;1) Create Bootloader&lt;/h3&gt;
&lt;p&gt;- Call nrf_bootloader_app_start(myStartAddress);&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void nrf_bootloader_app_start(uint32_t startAddress)
{
    nrf_dfu_mbr_init_sd();

    // Disable and clear interrupts
    NVIC-&amp;gt;ICER[0] = 0xFFFFFFFF;
    NVIC-&amp;gt;ICPR[0] = 0xFFFFFFFF;
    NVIC-&amp;gt;ICER[1] = 0xFFFFFFFF;
    NVIC-&amp;gt;ICPR[1] = 0xFFFFFFFF;

    sd_softdevice_vector_table_base_set(startAddress);
    nrf_dfu_mbr_irq_forward_address_set(MBR_SIZE);
    nrf_bootloader_app_start_final(startAddress);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;Modify the function (as below) to accept a custom address to forward the IRQ&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t nrf_dfu_mbr_irq_forward_address_set(uint32_t address)
{
    uint32_t ret_val = NRF_ERROR_INVALID_PARAM;
//  uint32_t address = MBR_SIZE;
...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In IAR&amp;#39;s flash table (.icf), set:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;define symbol __ICFEDIT_intvec_start__ = 0x000E0000; 

/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__   = 0x000E0000; //0x000F8000
define symbol __ICFEDIT_region_ROM_end__     = 0x000FDFFF; //0x000FE000

//I think this could be set to 0x000F8000-0x000FE000, but this is what the example used&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Guide the debugger to the correct&amp;nbsp;&lt;/span&gt;&lt;span class="prettyprint"&gt;&lt;code&gt;__vector_table&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;symbol:&lt;/span&gt; &lt;strong&gt;Project &amp;gt; Options &amp;gt; Debugger &amp;gt; Extra Options&lt;/strong&gt;&lt;span&gt;&amp;nbsp;and specify:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;--drv_vector_table_base=0x000E0000&lt;/pre&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1gu01pu7t1"&gt;2) Create Apps&lt;/h3&gt;
&lt;p&gt;Tell IAR where to store the two apps:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*App A*/
define symbol __ICFEDIT_intvec_start__ = 0x00027000;

/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__   	= 0x00027000;
define symbol __ICFEDIT_region_ROM_end__     	= 0x0004FFFF;

or use... 
/*App B*/
define symbol __ICFEDIT_intvec_start__ = 0x00057000;

define symbol __ICFEDIT_region_ROM_start__   	= 0x00057000;
define symbol __ICFEDIT_region_ROM_end__    	= 0x00087000;

&lt;/pre&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1gu01qhab2"&gt;3) Crop the Bootloader&lt;/h3&gt;
&lt;p id="mcetoc_1gu0219er3"&gt;For some reason, the bootloader code has a byte at 0x00000000 that prevents merging with the MBR/SoftDevices code.&amp;nbsp; Exclude this using the free hex tool:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;srec_cat.exe bootloader.hex -Intel -exclude 0x00000000 0x00001000 -o bootLoaderCropped.hex -Intel&lt;/pre&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1gu0219er3"&gt;4) Create the Bootloader Settings code&lt;/h3&gt;
&lt;p&gt;This is not needed for SDK15.0.0, but you may need it on later SDK&amp;#39;s or if you enable CRC checking (?)&lt;/p&gt;
&lt;p&gt;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/eith"&gt;&lt;/a&gt;Generate the bootloader settings code using the NRF tool:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --family NRF52840 --application main_app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex&lt;/pre&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1gu02fbnj4"&gt;5) Merge and Download Hex files&lt;/h3&gt;
&lt;p&gt;Use the nice NRF Util Programmer to merge and upload hex files.&lt;/p&gt;
&lt;p&gt;- Select device&lt;/p&gt;
&lt;p&gt;- Add the hex files&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bootloader (0x000E&amp;#39;0000 - 0x000E&amp;#39;1315)&lt;/li&gt;
&lt;li&gt;App 2&amp;nbsp;&lt;span&gt;(0x0005&amp;#39;7000 - 0x0007&amp;#39;A0AF)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;App 1 (0x0002&amp;#39;7000 - 0x0004&amp;#39;A0AF)&lt;/li&gt;
&lt;li&gt;MBR (0x0000&amp;#39;0000 - 0x0000&amp;#39;0A17) &amp;amp;&amp;nbsp;SoftDevices (0x0000&amp;#39;1000-0x0002&amp;#39;53C7)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;- Erase &amp;amp; Write: &lt;em&gt;Note that I received an error: Part of the HEX regions are out of the device memory size&lt;/em&gt;.&amp;nbsp; But I just proceeded.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1681482343059v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420140?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 08:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4363234-20ad-462a-8f0f-84a944bb5fdb</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;sd_softdevice_vector_table_base_set() function is there in SDK 15 as well (see nrf_sdm.h)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420055?ContentTypeID=1</link><pubDate>Wed, 12 Apr 2023 20:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75aaab20-6884-42dc-b545-bf7bb5cb0d57</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;Perhaps I need to use `&lt;span&gt;sd_mbr_command` instead, which takes a struct that includes the vector offset.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/420051?ContentTypeID=1</link><pubDate>Wed, 12 Apr 2023 20:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36d89e81-b55a-4b4b-8d85-c64645b75bcb</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;I am just now diving back into this.&amp;nbsp; In&amp;nbsp;SDKv15, there is no definition for `sd_softdevice_vector_table_base_set`.&amp;nbsp; What do you suggest?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/416049?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 14:24:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6c0a9ad-c50d-4a46-b153-0f949a370f91</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/eith"&gt;Einar Thorsrud&lt;/a&gt;&amp;nbsp;Thank you for that confirmation.&amp;nbsp; I will dive into that code further.&amp;nbsp; Much appreciated!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/416047?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 14:22:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2fa6aae-02cc-4746-801a-9a2ba93dc08c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The post I linked to describe how you can use this both with and without a SoftDevice (the difference is one line that initializes parts of the SoftDevice and one line that configures the SoftDevice so that it knows the application vector table address).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/416046?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 14:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f88f85ca-bc67-46ae-85df-6b70b049f052</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;Is there a way for the bootloader to tell the SoftDevice what address to jump to for the application?&lt;/p&gt;
&lt;p&gt;&lt;a title="Bootloader Document" href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsds_s132%2FSDS%2Fs1xx%2Fmbr_bootloader%2Fmbr_sd_reset_behavior.html&amp;amp;cp=3_4_1_0_11_2"&gt;See Bootloader Documentation&lt;/a&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span&gt;The bootloader is responsible for determining the start address of the application. It uses&amp;nbsp;&lt;/span&gt;&lt;code class="ph codeph"&gt;sd_softdevice_vector_table_base_set(uint32_t address)&lt;/code&gt;&lt;span&gt;&amp;nbsp;to tell the SoftDevice where the application starts.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did I read that wrong?&amp;nbsp; Is this to set where the bootloader jumps to (either application or SoftDevice)?&lt;/span&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/416043?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 14:14:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdf1c057-bc62-40c1-b587-1c7039a66678</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Softdevice only works in its specific flash location.&lt;/p&gt;
&lt;p&gt;Note that this also applies to any apps on Cortex-M3, at least last time I checked there was little support for position-independent code.&lt;/p&gt;
&lt;p&gt;One solution could be&lt;/p&gt;
&lt;p&gt;MBR-&amp;gt;Bootloader-&amp;gt;Softdevice-&amp;gt;Stub App C deciding wether to ececute-&amp;gt; either A or B&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/416041?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 14:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34bf3f65-2c98-4153-8a20-4260e272966d</guid><dc:creator>erk1313</dc:creator><description>&lt;p&gt;Thank you for providing that example.&amp;nbsp; However, as I understand it, that suggests a custom bootloader that jumps to Application A or B.&amp;nbsp; I need to also run SoftDevice:&lt;/p&gt;
&lt;p&gt;------MBR--&amp;gt;SoftDevice--&amp;gt;Application A or B.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If SoftDevice always runs whatever is immediately after, and that is fixed, is there a way to jump to Application A or B after running SoftDevice?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-----MBR--&amp;gt;SoftDevice--&amp;quot;Bootloader&amp;quot; --&amp;gt;Application A or B&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Perhaps I need two SoftDevice sectors?&lt;/p&gt;
&lt;p&gt;-----MBR--&amp;gt;Bootloader--&amp;gt; (SoftDeviceA--&amp;gt;Application A) || (SoftDeviceB--&amp;gt;ApplicationB)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your guidance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jump from SoftDevice to Application A or B</title><link>https://devzone.nordicsemi.com/thread/415931?ContentTypeID=1</link><pubDate>Fri, 17 Mar 2023 10:03:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c80edd24-e9fa-4514-8055-8dea8c3e9628</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You will need a&amp;nbsp;bootloader for this. The bootloader in the SDK does not support jumping to any address out of the box, but it is possible.&lt;/p&gt;
&lt;p&gt;The way this will work is that the MBR runs first, and then jumps to the bootloader. Then the&amp;nbsp;bootloader&amp;nbsp;can jump to either App 1 or App 2. (The default behavior in the bootloader in SDK version &amp;gt;=&amp;nbsp;15.0.0, is to jump to the SoftDevice, but then the SoftDevice will always jump to the application that is right above it.)&lt;/p&gt;
&lt;p&gt;See &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/130732"&gt;this post&lt;/a&gt; for details on how&amp;nbsp;can be done with SDK 15.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>