<?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>ping pong in between 2 application base addresses</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29322/ping-pong-in-between-2-application-base-addresses</link><description>Hi,
I would like to use ping pong mechanism to prevent faulty application update on nRF52840. Is there a way to build a single image to run at 2 different addresses? How should we tweak the linker file? 
 Thank you,
Min-Ching</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jan 2018 12:13:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29322/ping-pong-in-between-2-application-base-addresses" /><item><title>RE: ping pong in between 2 application base addresses</title><link>https://devzone.nordicsemi.com/thread/116668?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 12:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66e19957-5baf-4a3c-ac28-56eb5003cf9b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you going to have the bootloader ( I assume you will use softdevice) what you can do is to create an application image combine of 2 same binaries at different addresses. You can generate the binaries separately. Just modify the start address in the linker file.
Then you use mergehex to merge the 2 images.&lt;/p&gt;
&lt;p&gt;When you receive the merged image, the bootloader will simply update the flash with the big image. Then in your bootloader you will have a logic (your ping pong mechanism) to choose which address the bootloader should forward the vector table to (MAIN_APPLICATION_START_ADDR). The call nrf_bootloader_app_start() to jump to application is executed in nrf_dfu_init() and in main().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ping pong in between 2 application base addresses</title><link>https://devzone.nordicsemi.com/thread/116669?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 18:26:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca3ded53-2c2b-4104-ae83-6180f6254ed4</guid><dc:creator>min-ching</dc:creator><description>&lt;p&gt;Hi Hung,
We will have a boot loader to choose different application addresses accordingly. The same binary could be loaded to and run from 2 different addresses. I&amp;#39;m not sure how we can tweak the linker script to achieve this. (There&amp;#39;s application vector table contains fixed address.)
Can you please explain more on the last comment?&lt;/p&gt;
&lt;p&gt;Thank you,
Min-Ching&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ping pong in between 2 application base addresses</title><link>https://devzone.nordicsemi.com/thread/116667?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 12:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cedb9646-a4b0-4b21-bba9-d10bace2978d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Min-Ching,&lt;/p&gt;
&lt;p&gt;Could you elaborate a little bit more about the ping pong mechanism ?&lt;/p&gt;
&lt;p&gt;Do you plan to have a bootloader which can choose which application will be executed ?&lt;/p&gt;
&lt;p&gt;In our current implementation, the softdevice will only forward the vector table to the first address right after the softdevice (if there isn&amp;#39;t a bootloader).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>