<?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>SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17659/sdk-12-1-0-bootloader-does-not-run-application</link><description>I&amp;#39;m using the example bootloader from SDK 12.1.0 with gcc, nRF51822, S130. I flash the SD, bootloader and my application in that order like this: 
 flash: all
	$(NRFPROJ) --eraseall
	$(NRFPROJ) --program $(SOFTDEVICE)
	$(NRFPROJ) --program bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Nov 2016 14:24:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17659/sdk-12-1-0-bootloader-does-not-run-application" /><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67917?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 14:24:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:473769a2-c51a-4f5a-b498-298800cdfcfa</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Yep, the issue persists. Case number is 32770. Updating it now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67916?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2016 09:46:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c58b5454-56fc-4612-950d-0ffacfe19ba0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: what did you mean by &amp;quot;in a case&amp;quot; ? Is the issue still persists ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67915?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 16:20:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bc2789f-d7a8-4644-92ef-f40dd04d0acf</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I don&amp;#39;t have access to a DK until tomorrow, but have put app, bootloader, etc. in a case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67914?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 16:17:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7413e414-8616-4422-9710-6b4e11df3cf0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot: You can use nrfutil to perform a DFU update (you need a nRF51 dongle or a nRF5 DK). Also if you only flash bootloader and softdevice, it should enter DFU mode, and you can use nRFConnect to do DFU.&lt;/p&gt;
&lt;p&gt;Please provide me your bootloader, a simple app hex file (for example blinky) that you tried  and failed, and a .zip that you generated for the app.  I can try here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67911?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 16:03:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebce5101-2ba7-4ecd-ac5f-1c4ed9d8179e</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;I&amp;#39;ve debugged as best I can and the address of m_dfu_settings_buffer in flash is 0x3fc00 as expected. But the first uint32_t at that address is zero by the time the bootloader runs.
I can&amp;#39;t do a DFU update - I use the secure format with buttonless DFU and the nRF Connect app doesn&amp;#39;t support it. I need to build some stuff on the mobile app side out before I can do a DFU. In any case, after resetting, I check the bootloader settings page and the correct values are there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67913?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 15:20:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4254df96-e587-479b-b743-0e303a451d9e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Eliot:
Could you run in debug mode, step into the code and check why CRC reading was 0x00 ? (you need to turn off optimization when compiling)&lt;/p&gt;
&lt;p&gt;You can also do a flash dump (nrfjprog --readcode) then compare the flash after you do a DFU update using the bootloader and what you have in your setting.hex. In my case they are identical.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67908?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 14:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7502a0b7-2b6f-406e-bcd3-7f4f2b12044c</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Please see my Edit 2 above. I&amp;#39;ve left the .bootloaderSettings SECTION in the bootloader linker script and instead just used nrfproj to erase that page and write over it. The bootloader still can&amp;#39;t see the settings. I can&amp;#39;t see what&amp;#39;s wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67906?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 13:33:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2eef68d-1a02-4259-bfae-22b2f1205390</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;The last line of an objdump of the bootloader hex file is actually 0x3fb88, so I&amp;#39;m not sure where the conflict is now. Here&amp;#39;s the hex file for the bootloader settings.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:020000040003F7
:10FC000025232C0A01000000010000000100000073
:10FC1000000000000000000090B60100E15EEDA8C9
:10FC200001000000000000000000000000000000D3
:10FC300000000000000000000000000000000000C4
:10FC400000000000000000000000000000000000B4
:0CFC5000000000000000000000000000A8
:00000001FF
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67907?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 13:06:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62fc4454-11e6-4a90-9687-cb3dfae0bfd4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you check your bootloader hex file, what do you have at that address (0x3FC00) ? If there is already smth in there, you can also use nrfjprog to erase that page, and write the setting.hex in. When I compiled with Keil, I can simply merge the bootloader hex with the bootloader setting hex.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67912?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 12:59:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36e12f1b-8320-4513-ac81-1744cf646c01</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;This is despite me leaving room for the settings in the linker script for my bootloader:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FLASH (rx) : ORIGIN = 0x38000, LENGTH = 0x7C00 /* end: 0x3FC00, length: 31 kB */
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67910?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 12:58:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9de82f23-535c-4e6c-b800-a11aa3761387</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Actually, my bootloader links OK if I remove that SECTION. But I can&amp;#39;t merge hex files because the bootloader is extending right to the end of FLASH:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;bootloader/biketracker_debug/armgcc/_build/bootloader_s130.hex:     file format ihex
Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .sec1         00008000  00038000  00038000  00000011  2**0
                  CONTENTS, ALLOC, LOAD
  1 .sec2         00000024  00040000  00040000  0001683c  2**0
                  CONTENTS, ALLOC, LOAD
  2 .sec3         00000004  10001014  10001014  000168cd  2**0
                  CONTENTS, ALLOC, LOAD

_build/bootloader_settings.hex:     file format ihex
Sections:
Idx Name          Size      VMA               LMA               File off  Algn
  0 .sec1         0000005c  0003fc00  0003fc00  00000010  2**0
                  CONTENTS, ALLOC, LOAD
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67909?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 12:50:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4986605-7f85-4bc6-b7ad-e863cb8d2f84</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Converted your comment to an answer. It&amp;#39;s disappointing that none of this is addressed by the example apps. I&amp;#39;m not sure how anyone&amp;#39;s supposed to figure this out.&lt;/p&gt;
&lt;p&gt;My build now generates a hex file for the bootloader settings. I can&amp;#39;t merge it with the bootloader hex file  though, because the bootloader also has a .bootloaderSettings memory SECTION.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67905?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 12:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8c13ede-c8f9-4788-99b1-533931a5d6ee</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Eliot,&lt;/p&gt;
&lt;p&gt;You need to tell the bootloader that you have a valid app that you flashed in the chip. The bootloader won&amp;#39;t be able to detect it automatically. It was made that it only acknowledge a valid app when it actually update it via DFU process.&lt;/p&gt;
&lt;p&gt;What you can do is either do a DFU and then read out the bootloader setting in the flash, and re-use that data when you set-up another board (with same application).  Actually you can read out the whole flash and the simply flash that image to another board. I&amp;#39;m talking about production programming here.&lt;/p&gt;
&lt;p&gt;A more elegant solution is to generate the bootloader setting by using nrfutil tool. Please have a look &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/nrfutil/nrfutil_settings_generate_display.html?cp=5_4_6"&gt;here&lt;/a&gt;.
After that you can merge the setting .hex to the bootloader (and the rest e.g application, softdevice etc). Use mergehex.exe to merge.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67921?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 11:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:916a3f7a-fb3b-4aa4-9a96-f08e5ff804df</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Log:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:INFO:In real nrf_dfu_init
:INFO:running nrf_dfu_settings_init
:INFO:!!!!!!!!!!!!!!! Resetting bootloader settings !!!!!!!!!!!
:INFO:Erasing old settings at: 0x0003fc00
:INFO:Erasing: 0x0003fc00, num: 1
:INFO:Writing 0x00000057 words
:INFO:Writing settings...
:INFO:Enter nrf_dfu_continue
:INFO:bank_current is NRF_DFU_CURRENT_BANK_0. Using bank_0.
:INFO:p_bank image_size: 0, image_crc: 0, bank_code: 0.
:INFO:Single: Invalid bank
:INFO:nrf_dfu_enter_check(): Returning false.
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return false in valid app check
:INFO:In nrf_dfu_transports_init
:INFO:num transports: 1
:INFO:vector table: 0x00038000
SDH:INFO:sd_ble_enable: RAM START at 0x200025e0
:INFO:After nrf_dfu_transports_init
:INFO:------- nrf_dfu_flash_init-------
:INFO:Waiting for events
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67920?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 11:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06cceb6c-dcf8-43ef-9457-90ab8f479798</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;OK, I&amp;#39;m now able to debug my bootloader and this is the log from the first run. It resets the bootloader settings just fine, but then decides my application is not valid and refuses to run it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67924?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 10:32:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d606ef1b-e8aa-45d2-babe-a75abff9d2e5</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Sorry, spoke too soon. That output is when I flash the application without the bootloader. Give me some time to build a monolithic hex file that I can run with gdb and I&amp;#39;ll see if I can get the bootloader to run the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67923?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 10:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dcbd08e-6f34-41d9-8fc6-877aa53e1729</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Here&amp;#39;s my bootloader settings at this point:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/Users/Eliot/dev/nRF5x_tools/nrfjprog/nrfjprog -f NRF51 -c 1000 --memrd 0x3FC00 --n 0x60
0x0003FC00: AC871054 00000001 00000000 00000000   |T...............|
0x0003FC10: 00000000 00000000 00000000 00000000   |................|
0x0003FC20: 00000000 00000000 00000000 00000000   |................|
0x0003FC30: 00000000 00000000 00000000 00000000   |................|
0x0003FC40: 00000000 00000000 00000000 00000000   |................|
0x0003FC50: 00000000 00000000 00000000 00000000   |................|
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67922?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 10:16:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49d769f1-c3e9-4111-8a97-0b0465d23996</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;Thanks, you&amp;#39;re right and I had not caught the first run after flashing. When I do, nrf_dfu_settings_init() does its thing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:INFO:------- nrf_dfu_flash_init-------
:INFO:running nrf_dfu_settings_init
:INFO:!!!!!!!!!!!!!!! Resetting bootloader settings !!!!!!!!!!!
:INFO:Erasing old settings at: 0x0003fc00
:INFO:Erasing: 0x0003fc00, num: 1
:INFO:Writing 0x00000057 words
:INFO:Writing settings...
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67919?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 08:59:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e92c383-6cef-4e86-a36b-f54600123730</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Most likely you haven&amp;#39;t caught the first time the bootloader started (right after programming), and it already initialized.&lt;/p&gt;
&lt;p&gt;You can simply use nrfjprog to read the bootloader setting from flash of the chip and check what is inside. It&amp;#39;s located at 0x3FC00.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67925?ContentTypeID=1</link><pubDate>Sat, 12 Nov 2016 00:46:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21c0e08c-4f6b-45eb-8af9-300cf493ea07</guid><dc:creator>Eliot Stock</dc:creator><description>&lt;p&gt;But I pasted my log above, and nowhere in there is nrf_dfu_settings_init() logging &amp;quot;!!!!!!!!!!!!!!! Resetting bootloader settings !!!!!!!!!!!&amp;quot;. So the CRC must be either be 0xFFFFFFFF, or be valid. I expect it&amp;#39;s 0xFFFFFFFF. But in that situation, the function just returns. It does NOT write a valid bootloader settings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SDK 12.1.0 bootloader does not run application</title><link>https://devzone.nordicsemi.com/thread/67918?ContentTypeID=1</link><pubDate>Fri, 11 Nov 2016 09:52:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ba0c9a7-7219-4b90-b083-81e3c9916609</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Eliot,&lt;/p&gt;
&lt;p&gt;The bootloader setting is empty (all 0xFF) when the bootloader first flashed. It&amp;#39;s a page in flash located at address BOOTLOADER_SETTINGS_ADDRESS (0x3FC00). On the first run the bootloader will check if there is any bootloader setting CRC written, if there is nothing, it will write the initial setting (which has only bootloader version and the CRC). Please have a look at nrf_dfu_settings_init() in nrf_dfu_setting.c&lt;/p&gt;
&lt;p&gt;If you have no button, you can remove the part that we check if the button is pressed. You will then need to enter bootloader by either erase the application valid flag (and its CRC) in the bootloader setting page (what happens when you have no app in the flash) or you can set enter_buttonless_dfu = 1 flag in the bootloader setting. Make sure bootloader setting CRC is updated also.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>