<?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 + SD + APP Programming Via External Programmer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58266/dfu-sd-app-programming-via-external-programmer</link><description>Hi, I&amp;#39;m using the Cyclone FX programmer to program our custom boards with the NRF52840 chip, but after programming all the hex files, the application starts straightaway bypassing the bootloader. 
 
 This is my .cfg file: 
 
 
 Bootloader linker file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Feb 2020 01:30:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58266/dfu-sd-app-programming-via-external-programmer" /><item><title>RE: DFU + SD + APP Programming Via External Programmer</title><link>https://devzone.nordicsemi.com/thread/236671?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2020 01:30:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2583ac36-1e9f-4f36-858f-e78b40a91656</guid><dc:creator>aa</dc:creator><description>&lt;p&gt;Amanda, thank you! your recommendation about merging the hex files worked like a charm.&lt;/p&gt;
&lt;p&gt;A recommendation for future reference&amp;nbsp;in case anyone out there having the same issues; make sure that when you generate your bootloader settings file using the &amp;#39;nrfutil settings generate&amp;#39; command, you specify the --application and --key-file flags, otherwise the bootloader will mark the flashed application as invalid and won&amp;#39;t execute it.&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --key-file private.key --application /path/to/application.hex ....other settings....&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU + SD + APP Programming Via External Programmer</title><link>https://devzone.nordicsemi.com/thread/236471?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 09:52:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b9dc3ff-75b9-4d98-a1b6-abc85c14f260</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It could be that when the softdevice is programmed, the bootloader start address that is written to MBR, is overwritten.It will then don&amp;#39;t jump to the bootloader at startup, because the MBR does not think there is a bootloader present.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A solution could be to merge all the hex-files, with &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf5x_cltools/UG/cltools/nrf5x_mergehex.html"&gt;mergehex&lt;/a&gt;, and then program the combined hex.&amp;nbsp;Please see this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44872/bootloader-does-not-work-if-compiled-using-armgcc/176446#176446"&gt;post&lt;/a&gt;&amp;nbsp;and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/56437/mbr-jumps-to-application-not-bootloader"&gt;this&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU + SD + APP Programming Via External Programmer</title><link>https://devzone.nordicsemi.com/thread/236390?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 21:26:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d88ed914-c0e7-4a0e-aeb5-bea237ff4f16</guid><dc:creator>aa</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;The problem is that programming the binaries&amp;nbsp;at the&amp;nbsp;addresses defined&amp;nbsp;in the .cfg file using the Cyclone FX programmer doesn&amp;#39;t seem to execute the bootloader, instead, it jumps straightaway to the user app. Entering into bootloader mode via&amp;nbsp;&lt;span&gt;NRF_POWER&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;GPREGRET&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;0xB1 doesn&amp;#39;t work either.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As I mentioned in the original post, I suspect it is something related to my settings.hex file (or lack of another config file) because if the same binaries are programmed using nrfjprog, everything works as expected (bootloader runs first, then jumps to the user app, and I can enter bootloader mode via NRF_POWER reg).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I guess I can rephrase the question: &amp;#39;Is there any config file/flag that I&amp;#39;m missing that is preventing the bootloader from running?&amp;quot; Why is the app being executed straightaway?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU + SD + APP Programming Via External Programmer</title><link>https://devzone.nordicsemi.com/thread/236259?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 12:45:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b30d066-fa35-486c-8bc1-844f000d9299</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]Everything works fine if programmed via &lt;strong&gt;nrfjprog.&lt;/strong&gt;[/quote]
&lt;p&gt;I don&amp;#39;t understand the problem. Do you mean the issue only happened while using the&amp;nbsp;&lt;span&gt;Cyclone FX programmer?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>