<?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>How to debug Application Code after add other service to Bottonless DFU?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32493/how-to-debug-application-code-after-add-other-service-to-bottonless-dfu</link><description>All, 
 I already run BottonlessDFU example successfully after refer to below link. What&amp;#39;s more, I added BAS and DIS service to Bottonless DFU example, and after use nrfutil.exe to generate app package, I can use nRF Connect to upload the application firmware</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Mar 2018 08:10:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32493/how-to-debug-application-code-after-add-other-service-to-bottonless-dfu" /><item><title>RE: How to debug Application Code after add other service to Bottonless DFU?</title><link>https://devzone.nordicsemi.com/thread/126381?ContentTypeID=1</link><pubDate>Thu, 29 Mar 2018 08:10:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06864cb6-d2c9-4c4d-b9c8-e2b7e8ae2a69</guid><dc:creator>LianXiaoYa</dc:creator><description>&lt;p&gt;Terje,&lt;/p&gt;
&lt;p&gt;SDK15.0.0 was released. Now I want to move to new SDK. so have same question that how to skip CRC checking in secure_bootloader_ble_s132_pca10040? It seems that CRC related function changes a lot, have below define in sdk_config.h. so if I want to disable CRC checking, add below code before nrf_bootloader_init(), is that ok? or have other simpler way to skip CRC? Thanks a lot.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_POWER-&amp;gt;&lt;span&gt;GPREGRET2 |= 0x01;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div class="memproto"&gt;
&lt;table class="memname"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td class="memname" colspan="1" rowspan="1"&gt;#define NRF_BL_APP_CRC_CHECK_SKIPPED_ON_GPREGRET2&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class="memdoc"&gt;&lt;/div&gt;
&lt;div class="memdoc"&gt;Looking forward to your reply.&lt;/div&gt;
&lt;div class="memdoc"&gt;&lt;/div&gt;
&lt;div class="memdoc"&gt;BR,&lt;/div&gt;
&lt;div class="memdoc"&gt;XiaoYa&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Application Code after add other service to Bottonless DFU?</title><link>https://devzone.nordicsemi.com/thread/125432?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 02:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bbef9f1-ef58-4964-b69c-b723273d4153</guid><dc:creator>LianXiaoYa</dc:creator><description>&lt;p&gt;Terje,&lt;/p&gt;
&lt;p&gt;Thanks a lot for your kindly help. Solve my issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Lina&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Application Code after add other service to Bottonless DFU?</title><link>https://devzone.nordicsemi.com/thread/125413?ContentTypeID=1</link><pubDate>Wed, 21 Mar 2018 16:51:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc758547-6b59-420b-ae10-0102a9ff8e1e</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is not the signing that prevents the application from running. It is a CRC check done by the bootloader, in order to only start the application if it is there and if it is the correct one.&lt;/p&gt;
&lt;p&gt;You can do a small modification to the DFU bootloader in order to skip the CRC check of the application. Then it will jump straight into the application even if the application has been changed, which means you can do debugging, development, etc. without having to rewrite the bootloader settings page all the time.&lt;/p&gt;
&lt;p&gt;In nrf_dfu_utils.c, add the following lines to nrf_dfu_app_is_valid(), &lt;em&gt;before&lt;/em&gt; the &amp;quot;&lt;code&gt;// If CRC == 0, the CRC check is skipped.&lt;/code&gt;&amp;quot; line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#ifdef DFU_BOOTLOADER_DISABLE_APP_CRC_CHECK
    NRF_LOG_DEBUG(&amp;quot;Skipping application CRC check, as it is disabled.&amp;quot;);
    return true;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then add the preprocessor define DFU_BOOTLOADER_DISABLE_APP_CRC_CHECK to the bootloader project.&lt;/p&gt;
&lt;p&gt;Alternatively, if you do not want to modify the DFU library at all, you can set the bank_0.image_crc field of the DFU settings page to 0, as that will also skip checking the CRC of the application.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Application Code after add other service to Bottonless DFU?</title><link>https://devzone.nordicsemi.com/thread/125253?ContentTypeID=1</link><pubDate>Wed, 21 Mar 2018 02:56:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f03ef1-6d4a-42f6-8ea7-6ee58caf5685</guid><dc:creator>LianXiaoYa</dc:creator><description>&lt;p&gt;&lt;span&gt;Terje，&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks a lot for your kindly reply and help. According to your suggestion, I can set up A1 and A2. However, still not solve my question. What I want to know is &amp;quot;how to debug the application project (such as ble_app_buttonless_dfu project), if already have DFU bootloader+SD in nRF52832?&amp;quot;, not to debug the DFU bootloader.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What&amp;#39;s more, the purpose I want to remove the uECC, is also because I want to debug the application project in IAR, for I want to add further functions based on Buttonless_DFU application project, and want to make sure the functions I add can run well. Before I thought maybe uECC lead to Buttonless_DFU can&amp;#39;t run to main, when I use IAR to debug and download my modified application. After get your reply, maybe also need to add&amp;nbsp;bootloader settings page checking.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;so what&amp;#39;s your suggestion for how to debug the application project if already have DFU bootloader&amp;nbsp;+ SD in nRF52832? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;or maybe we can&amp;#39;t debug it when have bootloader+SD? then what&amp;#39;s your suggestion for steps to develop own application code based on Buttonless_DFU example?&amp;nbsp; maybe as below, 1. make sure own application code works well when no bootloader; 2. integrate own application code&amp;nbsp; into Buttonless DFU project; 3. use your A2 steps to program to flash, to see whether integrated application code can run well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Looking forward to your reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;XiaoYa&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to debug Application Code after add other service to Bottonless DFU?</title><link>https://devzone.nordicsemi.com/thread/125192?ContentTypeID=1</link><pubDate>Tue, 20 Mar 2018 14:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9aefe00-dc31-42d1-8dde-e13b2ece0863</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;A1: For debug sessions, always set the DEBUG preprocessor define and set optimization level to 0. For debugging the DFU bootloader, use the debug version of the bootloader. You can use &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.tools%2Fdita%2Ftools%2FnRF_Connect%2FnRF_Connect_framework_intro.html"&gt;nRF Connect&lt;/a&gt; for manually testing the services on your device. The &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.tools%2Fdita%2Ftools%2Fsniffer%2Fsniffer_intro.html"&gt;nRF Sniffer&lt;/a&gt; lets you monitor on-air BLE traffic.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A2: The DFU bootloader uses a page in flash, the bootloader settings page, for registering information about the current application. It writes to this page whenever it installs a new application over DFU, and it checks with this page to see if there is currently an application installed and that the application is the correct one.&lt;/p&gt;
&lt;p&gt;The bootloader settings page is separate from the bootloader (i.e. not included in the bootloader .hex). Therefore, when you use a programmer to download bootloader + SD + application, the bootloader settings page is still empty and the bootloader will not know that there is an application to start. For more on the bootloader settings page, see the last section of &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.2.0%2Flib_bootloader_dfu_process.html"&gt;Device Firmware Update process&lt;/a&gt; on Infocenter.&lt;/p&gt;
&lt;p&gt;You can use nrfutil to generate a bootloader settings file for a given application. You then program the board with settings file, bootloader, SD and app, and then the app will start. See &amp;quot;Appendix 1. Advanced features&amp;quot; of &lt;a href="https://devzone.nordicsemi.com/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader"&gt;Getting started with Nordic&amp;#39;s Secure DFU bootloader&lt;/a&gt; that you referred to.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A3: You need to add the public key in the bootloader, and use the private key to generate the DFU package. May I ask for what purpose you want to remove this signing? The code checking the signature is found in dfu_handle_prevalidate() in dfu_req_handling.c, under the &amp;quot;// Check the signature&amp;quot; comment on line 358.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>