<?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>DFU image with gcc optimisation bricks device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64767/dfu-image-with-gcc-optimisation-bricks-device</link><description>Hello, 
 I am experiencing some strange behaviour through DFU process when build with GCC -O2 optimisation. 
 The upgrade process seems to complete successfully but after this our device is unresponsive. Looking through the RTT logs, it seems to throw</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Aug 2020 08:43:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64767/dfu-image-with-gcc-optimisation-bricks-device" /><item><title>RE: DFU image with gcc optimisation bricks device</title><link>https://devzone.nordicsemi.com/thread/264575?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2020 08:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd8569e6-1c42-4b75-bf06-bbfb4e65bfe9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, I agree, the best solution is to upgrade to SDK 17 as long as that&amp;#39;s an option.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU image with gcc optimisation bricks device</title><link>https://devzone.nordicsemi.com/thread/264573?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2020 08:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc039a82-8889-463c-80a4-4003f403bee4</guid><dc:creator>AndoniV</dc:creator><description>&lt;p&gt;Hi Vidar, thank you for your response, I will give this a try! But seems like a better solution would be to upgrade our whole system to the latest SDK version.&lt;/p&gt;
&lt;p&gt;Once again, much appreciated!&lt;/p&gt;
&lt;p&gt;Andoni&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU image with gcc optimisation bricks device</title><link>https://devzone.nordicsemi.com/thread/264356?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 06:29:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34a8139a-666d-4814-a3e2-1a728b26f7ed</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please try replacing the nrf_bootloader_app_start_final.c-&amp;gt;jump_to_addr() function with the new one from SDK 17.0.0 below. I&amp;#39;m pretty sure it will fix the problem. Our old GCC assembly implementation would break when optimization was turned off and cause the program to jump to the wrong address.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function that sets the stack pointer and starts executing a particular address.
 *
 * @param[in]  new_msp  The new value to set in the main stack pointer.
 * @param[in]  addr     The address to execute.
 */
void jump_to_addr(uint32_t new_msp, uint32_t addr)
{
    __set_MSP(new_msp);
    ((void (*)(void))addr)();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>