<?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>Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32756/segger-embedded-studio-loops-in-softdevice</link><description>Hi, 
 My project cannot be debugged using Segger Embedded Studio. The debugger doesn&amp;#39;t halt at the application main and instead keeps running. Hitting a pause shows the debugger at &amp;#39;SEV&amp;#39; instruction at address 0x0001304A (which seems to be from softdevice</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Apr 2018 13:16:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32756/segger-embedded-studio-loops-in-softdevice" /><item><title>RE: Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/thread/126660?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 13:16:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d76e9495-a97c-4ab2-9f0e-5bf494ba2c44</guid><dc:creator>chaitz</dc:creator><description>&lt;p&gt;Thank you. That&amp;#39;s very helpful. I will take a look at this new config option and its implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/thread/126636?ContentTypeID=1</link><pubDate>Tue, 03 Apr 2018 11:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d34eca2-d357-49b6-a9e7-72b0524b089b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can&amp;nbsp;skip the crc in nrf_dfu_utils.c -&amp;gt; nrf_dfu_app_is_valid() by doing something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;bool nrf_dfu_app_is_valid(void)
{
    NRF_LOG_DEBUG(&amp;quot;Enter nrf_dfu_app_is_valid&amp;quot;);
    if (s_dfu_settings.bank_0.bank_code != NRF_DFU_BANK_VALID_APP)
    {
       // Bank 0 has no valid app. Nothing to boot
       NRF_LOG_DEBUG(&amp;quot;Return false in valid app check&amp;quot;);
       return false;
    }

#ifndef SKIP_INTEGRITY_CHECK
    // If CRC == 0, the CRC check is skipped.
    if (s_dfu_settings.bank_0.image_crc != 0)
    {
        uint32_t crc = crc32_compute((uint8_t*) CODE_REGION_1_START,
                                     s_dfu_settings.bank_0.image_size,
                                     NULL);

        if (crc != s_dfu_settings.bank_0.image_crc)
        {
            // CRC does not match with what is stored.
            NRF_LOG_DEBUG(&amp;quot;Return false in CRC&amp;quot;);
            return  false;
        }
    }
#endif //SKIP_INTEGRITY_CHECK

    NRF_LOG_DEBUG(&amp;quot;Return true. App was valid&amp;quot;);
    return true;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that compile time flags to skip&amp;nbsp;CRC check were added in SDK 15. You could implement the same in SDK 14&amp;nbsp; (&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrf__bootloader__config.html#gae5beef093d98f33676857579e2ce724a"&gt;flags to skip CRC in SDK 15&lt;/a&gt;).&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/thread/126294?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2018 09:57:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5c20967-eebf-4733-9537-4be4d3d12e79</guid><dc:creator>chaitz</dc:creator><description>&lt;p&gt;Yes! Thanks that does help although it causes other issues like DFU BLE service cannot be initialised because the bootloader address is not found in NRF_UICR-&amp;gt;NRFFW[1] register. Is there a way to generate a hex file which skips the CRC check? i.e. bootloader settings file with 0 CRC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/thread/126150?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2018 15:57:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:393f19f4-c350-497e-9225-83e85d1c45b2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The bootloader runs a CRC check on the application on startup to check if it is valid, and enters DFU mode if the check fails. This check will fail if you make code changes in the app, then upload the new app through SES. Do you see the same if you erase the bootloader?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/thread/126145?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2018 15:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5682a23-8156-40db-b6a9-703537a482b7</guid><dc:creator>chaitz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your response. OK. That makes sense about SEV, WFE instruction. Yes my debugger settings are fine and I am able to debug the example and my code during initial stages of the project. As more modules were added the debugger does not halt at main (instead is just in running state). The BLE DFU bootloader enters DFU mode&amp;nbsp;when segger debug-&amp;gt;go option is selected. I can&amp;#39;t figure out why debugging invalidates the app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio loops in softdevice</title><link>https://devzone.nordicsemi.com/thread/126134?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2018 14:13:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:980e8a49-b8e5-4bde-b0aa-868833ba47cb</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The __SEV and __WFE instructions in the softdevice are used to make the chip enter system ON idle mode (sleep), which typically is &amp;gt;99% of the time. In other words, there is a high probability that the PC will be at&amp;nbsp;0x0001304A&amp;nbsp;when you halt the CPU.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SES projects delivered in our SDKs are configured to break at main, and I verified this with the hrs freertos example in SDK 14.2.0. Have you tried this example?&lt;/p&gt;
&lt;p&gt;Debugger settings to break at main:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1522160010218v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>