<?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 control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7766/dfu-control-point-write-app-not-restarting-into-bootloader-gcc-sdk-8-0-0</link><description>I&amp;#39;ve followed the instructions for adding the DFU service to my app to the letter and can see the DFU service from the central and can enable notifications on the control point and write a 01 04 to it to kick off DFU OTA for the application. The application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Jul 2015 17:19:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7766/dfu-control-point-write-app-not-restarting-into-bootloader-gcc-sdk-8-0-0" /><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27662?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2015 17:19:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f56d688f-4454-4f50-ac5c-f44b437fd807</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;The missing NOLOAD might have had something to do with it. I&amp;#39;ve had to port my application and bootloader from 8.0.0 to 8.1.0. The GPIOTE issue is not trivial to fix with gcc and involved a lot of hacking SDK sources. Unpleasant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27667?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2015 14:38:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03bba4d2-049c-464c-b3bc-8f7548070984</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: Could you send the hex file you compiled with your toolchain ? I can try to flash it here and compare to the hex file I generated.
If you have earlier revision of the chip, it might not work if  you don&amp;#39;t change the option for concurrent CPU and Radio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27664?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2015 09:38:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:678ddcae-6ae6-4e94-9652-184b3120d6de</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;DFU support for IAR and GCC was first added in SDK 8.1.0. The assembly routines prior to this release only supported the ARM toolchain. The GPIOTE issue you are mentioning only occurs when combining the app_gpiote module with the gpiote driver. Have you had a chance to try one of my suggestions and see if it solved the problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27666?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 15:49:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:132852cf-1099-4605-8b14-7038ef00bf52</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;When flashing the binary I build from your example app, JLink fails with a -1 return code and no error message. Not very helpful. Thanks for taking the time to build these. I can flash them without errors, but when I run them the chip doesn&amp;#39;t advertise. I have an xxaa revision chip, which might have something to do with it. It&amp;#39;s very hard to debug this on a custom board when my debug LED pins are not the same as the ones on the dev kit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27663?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 15:37:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e34e2604-af3e-4dad-8078-7799efda1206</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;So SDK 8.1.0 is badly broken for GPIOTE (see &lt;a href="https://devzone.nordicsemi.com/question/40670/sdk81-app_gpiote-and-nrf_drv_gpiote-conflict/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt; and SDK 8.0.0 is broken for DFU with gcc?&lt;/p&gt;
&lt;p&gt;Will there be an SDK 8.2.0? Will it fix both of these issues?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27665?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 11:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:396a7c06-e722-46d5-9d15-62c28b87e3f4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: Could you explain the issue you have with flashing the example ? I don&amp;#39;t really get it if you can flash your own hex but not the hex from our example.&lt;/p&gt;
&lt;p&gt;Could you let me know which bootloader you are using (SDK version) ? Have you tried the SDK v8.1 bootloader ? As suggested by Vidar, there are some modification added to dfu_ble_svc.c file to support gcc.&lt;/p&gt;
&lt;p&gt;You were correct on the app_context_load(), we forgot to mention it in the documentation, we will try to add that. The main purpose is to tell the application to send the service changed notification after it finishes with DFU. But you still should be able to jump to DFU bootloader, with or without that call.&lt;/p&gt;
&lt;p&gt;I attached in the answer the 2 hexes, SDK v8.1 bootloader and hrs_dfu application I compiled using gcc (v4.9 2015q1) on Window. I tested and it worked fine.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf51422_5F00_xxac_5F00_s110.hex"&gt;nrf51422_xxac_s110.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7774.bootloader.hex"&gt;bootloader.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27661?ContentTypeID=1</link><pubDate>Fri, 26 Jun 2015 11:43:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67481fa3-9534-4f0b-b0a1-3dbe777ebc0d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;If the SVC_Handler is implemented incorrectly it could make the bootlaoder fail to enter DFU mode. My suggestion would be to use the official GCC bootloader from SDK 8.1.0 if possible. Alternatively import the df_ble_svc.c (adds support for GCC) file from this release to see if it solves the problem.&lt;/p&gt;
&lt;p&gt;You were right that the &lt;a href="https://developer.nordicsemi.com/nRF51_SDK/nRF51_SDK_v8.x.x/doc/8.1.0/s110/html/a00087.html"&gt;SDK doc&lt;/a&gt; was lacking information regarding the service changed characteristic. In addition to implementing the load app context function as you mentioned, you also need to make sure to allocate space for the app context in device_manager_cnfg.h.  I will report this internally, sorry for the inconvenience.&lt;/p&gt;
&lt;p&gt;Attached bug fixed linker script as the one provided in the SDK was missing the &lt;a href="ftp://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_21.html"&gt;NOLOAD&lt;/a&gt; directive for the .noinit and .bootsettings sections:
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_gcc_5F00_nrf51.ld"&gt;dfu_gcc_nrf51.ld&lt;/a&gt;
This issue caused the linker  to (&amp;quot;try&amp;quot;) place init data in the bootsettings page and .noinit section in RAM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27660?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 15:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c360f875-4f27-4d0e-ad41-ba3191c7697e</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;@Hung, OK, well, regardless, I can&amp;#39;t get the example app to flash to a custom board on a Mac. I&amp;#39;m looking for differences between the example app and mine and found that your docs make no mention of the fact that I need to add an app_context_load() function and call it from the device manager event handler. But even with that in place, the call to dfu_ble_svc_set_peer_data() still fails. I&amp;#39;ll edit the question again and show as much as gdb can see before that call for the peer data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27659?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 13:11:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:997514b2-85d1-4b03-9982-f9d20cec9ba4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: The nRF51422 and nRF51822 are the same when you use with S110 (only difference is nRF51422 can run S210, S310). You don&amp;#39;t need NO-INIT on the application.
Storing bonding information to NO-INIT area (for bootloader) is done by the SVC call.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27658?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 13:00:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed866b43-2caa-4696-9744-d5150252a6f5</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;@Hung That example project isn&amp;#39;t much use, sorry. It&amp;#39;s for a 51422, the Makefile is Windows-specific (assumes nrfproj.exe is present) and the linker script has no NOINIT RAM section.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27657?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 11:01:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e9cefd9-4e4d-43a0-8373-f5d3be1c6dae</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: Do you have the same issue with the SVC call with the ble_app_hrs_dfu example  ? I thought the issue of that example with gcc was fixed from SDK v8.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27656?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 16:02:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43e939cd-1188-4f64-ac9e-39ee3afa6a3c</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Sure, I&amp;#39;ll edit the question and add the code for that, but I&amp;#39;ve stepped through the SDK sources using debug LEDs and found that there are two problems. The first is that the byte order for the DFU control point value was wrong. I was sending 0x0104 but needed to send 0x0401. The second is that the bond sharing is failing. The call to dfu_ble_svc_set_peer_data() at dfu_app_handler.c L99, which is an SVC, fails. I don&amp;#39;t yet have any idea why that fails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27655?ContentTypeID=1</link><pubDate>Wed, 24 Jun 2015 09:05:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be1c2207-0be8-4026-9e0f-8fa2be662d36</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: Could you post the code you used to jump to bootloader (bootloader_util_reset() ) ?&lt;/p&gt;
&lt;p&gt;Could you try with the example we provided at \examples\ble_peripheral\ble_app_hrs\pca10028\s110_with_dfu to see if you can jump to the bootloader ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27654?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 16:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:268eeddf-fed1-45d8-988b-49688becb47d</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Yes, I have custom linker scripts for both my app and my bootloader, but they are very similar to the dfu_gcc_nrf51.ld in the SDK 8.1.0 example. They both have the last 0x80 of RAM as NOINIT and the peer data variables have the attribute stuff to put them in that section.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU control point write, app not restarting into bootloader, gcc, SDK 8.0.0</title><link>https://devzone.nordicsemi.com/thread/27653?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2015 12:10:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6702656-2c55-456b-ba25-7cdd31d85498</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: I haven&amp;#39;t tried the DFU with gcc lately, but have you make sure you used dfu_gcc_nrf51.ld ? There we define the NOINT Ram area that we share between the application and the bootloader.&lt;/p&gt;
&lt;p&gt;On KEIL, when I want to do debuging with the bootloader, I still can set a breakpoint in main in  bootloader, and wait until the application branch back (by bootloader_start() function in the dfu_app_handler.c ) and can start stepping through the bootloader code from there.&lt;/p&gt;
&lt;p&gt;If the GDB debugger wouldn&amp;#39;t support that, you can try to turn on a LED at the begining of bootloader main().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>