<?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>App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17781/app-does-not-start-from-bootloader-when-it-is-programmed-via-jlink</link><description>Hi All, 
 Please, I would like to know why when using bootloader on nRF51822 , the app does not start when it is being flashed with a debugger (I&amp;#39;m using the J-Link), however when programmed with MCP (Master Control Pannel) using DFU service every thing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Nov 2016 09:52:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17781/app-does-not-start-from-bootloader-when-it-is-programmed-via-jlink" /><item><title>RE: App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/thread/68489?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 09:52:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:350b9303-cbc4-4564-9bb7-c4682e6a0bf9</guid><dc:creator>Aravinth</dc:creator><description>&lt;p&gt;That&amp;#39;s right. It was in different place in older SDKs while the blogpost was written and it could be compiled only on Keil because of Keil ARM specific code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/thread/68488?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 16:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2650b2c-721b-44f1-9c8f-d7cd1ab7724d</guid><dc:creator>Aymen Rejeb</dc:creator><description>&lt;p&gt;Hi Aravinth,&lt;/p&gt;
&lt;p&gt;Sorry to tell you that, but Nordic have absolutely right ;)&lt;/p&gt;
&lt;p&gt;Actually, I was editing the wrong file! it is not bootloader_util_arm.c as mentioned &lt;a href="https://devzone.nordicsemi.com/question/15081/how-to-flash-the-softdevice-the-bootloader-and-the-application-at-once/"&gt;here&lt;/a&gt; but the &lt;strong&gt;bootloader_settings.c&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7534.bootloader_5F00_settings.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bank_5F00_0.PNG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/thread/68486?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 14:41:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd9af60a-bf77-4300-b16a-387a16f419eb</guid><dc:creator>Aravinth</dc:creator><description>&lt;p&gt;First option was suggested by Nordic and it didn&amp;#39;t work out for me as well because i&amp;#39;m compiling with GCC SDK8. I was always manually writing the bootloader setting page, that is 255th page of 256 KB ROM. So it worked out for you as well. Please mark it as a correct answer by clicking the grey circular tick next to the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/thread/68485?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 14:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae42cf57-78b0-4ccb-a61a-f0ff98270d17</guid><dc:creator>Aymen Rejeb</dc:creator><description>&lt;p&gt;Hi Aravinth,&lt;/p&gt;
&lt;p&gt;The first option, editing the bootloader settings in  bootloader_util_arm.c (m_boot_settings &amp;lt;== BANK_VALID_APP) doesn&amp;#39;t work for me, the &lt;strong&gt;p_bootloader_settings-&amp;gt;bank_0 flag&lt;/strong&gt; still &lt;strong&gt;zero&lt;/strong&gt; initialized!
However, doing it manually worked fine! see attached screen-shots.&lt;/p&gt;
&lt;p&gt;Please note that I&amp;#39;m using SDK10 on nRF51822 (256 Ko Flash /16 Ko RAM).&lt;/p&gt;
&lt;p&gt;Do you have any other suggestions that could fix this?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/thread/68484?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 09:19:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:397c8323-3f4c-4576-94e6-c6064630a5f7</guid><dc:creator>Aravinth</dc:creator><description>&lt;p&gt;If my answer works for you, please mark it as a correct answer by clicking the tick.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App does not start from bootloader when it is programmed via jlink</title><link>https://devzone.nordicsemi.com/thread/68487?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2016 17:12:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bebf83e-26d8-4593-ac99-310fc9049bac</guid><dc:creator>Aravinth</dc:creator><description>&lt;p&gt;If you have erased the chip completely and flash everything, then you have to manually write VALID_APP after flashing. It could be done writing to bootloader settings using J-Link/nrfjprog or you can add it as a default bootloader setting in your firmware as&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;const uint8_t m_boot_settings[CODE_PAGE_SIZE] &lt;strong&gt;attribute&lt;/strong&gt;((at(BOOTLOADER_SETTINGS_ADDRESS))) &lt;strong&gt;attribute&lt;/strong&gt;((used)) = {BANK_VALID_APP};&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Have a look at &lt;a href="https://devzone.nordicsemi.com/question/15081/how-to-flash-the-softdevice-the-bootloader-and-the-application-at-once/"&gt;this&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;If you flash only the firmware (bootloader and softdevice flashed separately) with --sectorerase, then bootloader setting will not be erased.&lt;/p&gt;
&lt;p&gt;For example my bootloader settings are at 0x3fc00 and i do &lt;strong&gt;nrfjprog --memwr 0x3fc00 --val 0x01 -f NRF51&lt;/strong&gt; to booloader settings to have VALID_APP flag, if i have erased whole chip and flashed everything fresh.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>