<?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>Flashing using nrfjprog</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58435/flashing-using-nrfjprog</link><description>HI everyone, 
 
 I am currently facing an issue when using nrfjprog to flash my nrf52832-based custom board using nrfjprog. 
 Here is the steps I followed: 
 - Creating application hex by merging my app and s132 softdevice (mergehex) 
 - Creating the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Mar 2020 09:43:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58435/flashing-using-nrfjprog" /><item><title>RE: Flashing using nrfjprog</title><link>https://devzone.nordicsemi.com/thread/237360?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2020 09:43:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83d02773-01e9-46f5-b132-f59dbf126cfd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;When you reset the SD+BL the BL will write to the bootloader setting section, this cause the write to bootloader_setting.hex fail due to &amp;quot;the area to flash is not erased&amp;quot;&amp;nbsp;&lt;br /&gt;You can do &amp;quot;nrfjprog -f NRF52 --program bootloader_setting.hex --sectorerase&amp;quot; to fix this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure why the solution using mergehex doesn&amp;#39;t work. One thing you can try to check why it doesn&amp;#39;t work is to do a &amp;quot;nrfjprog --readcode&amp;quot; to get a hex dump and use notepad++ to compare the 2 hex files, the merged hex and the hex dump.&amp;nbsp;In theory they should be the same.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing using nrfjprog</title><link>https://devzone.nordicsemi.com/thread/237192?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 14:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a457414e-745e-4a50-b819-acc7fdf2f4f2</guid><dc:creator>rchaudet</dc:creator><description>&lt;p&gt;I just got my app start by flashing bootloader settings before my app.&lt;/p&gt;
&lt;p&gt;So here are the steps which seems to work for me so far:&lt;/p&gt;
&lt;p&gt;-Erase chip&lt;/p&gt;
&lt;p&gt;-Program SoftDevice&lt;/p&gt;
&lt;p&gt;-Program Bootloader&lt;/p&gt;
&lt;p&gt;-Program Settings&lt;/p&gt;
&lt;p&gt;-Program App&lt;/p&gt;
&lt;p&gt;-Reset Chip&lt;/p&gt;
&lt;p&gt;I will do more testings to make sure everything is reliable this way.&lt;/p&gt;
&lt;p&gt;Does that mean I will not be able to use mergehex?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing using nrfjprog</title><link>https://devzone.nordicsemi.com/thread/237174?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 14:27:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:015de592-9eb1-46af-9f67-3538d7a78626</guid><dc:creator>rchaudet</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for your feedback.&lt;/p&gt;
&lt;p&gt;When proceeding in this order:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --eraseall
nrfjprog -f NRF52 --program s132_nrf52_6.1.1_softdevice.hex      //S132 softdevice
nrfjprog -f NRF52 --program secure_bootloader_ble_s132.hex      //Bootloader&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;without using mergehex, then bootloader is working, but only after a reset:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -f NRF52 --reset&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then I flash my app with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -f NRF52 --program myapp.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then the bootloader settings:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog -f NRF52 --program bootloader_setting.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here I get the error &amp;quot;the area to flash is not erased&amp;quot;&lt;/p&gt;
&lt;p&gt;Does that mean the settings memory area is overlapping the one of the app, softdevice or bootloader?&lt;/p&gt;
&lt;p&gt;Maybe the issue comes from here&lt;/p&gt;
&lt;p&gt;My bootloader settings is generate through:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --family NRF52 --application myapp.hex --application-version 1 --bootloader-version 0 --bl-settings-version 2 bootloader_setting.hex&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing using nrfjprog</title><link>https://devzone.nordicsemi.com/thread/237151?ContentTypeID=1</link><pubDate>Fri, 28 Feb 2020 13:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b363b70e-9ada-47e0-b9f7-ce532c5ecdd3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Remi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please try to test the bootloader setting without doing merge hex.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please first flash the softdevice and the bootloader. Verify that the bootloader is running.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then flash the application and the bootloader setting (don&amp;#39;t do reset in between) and then reset, check if the bootloader is still running or it&amp;#39;s the application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the chip doesn&amp;#39;t show any activity, please check the log. If there isn&amp;#39;t good information in the log, please debug the bootloader, it&amp;#39;s like normal application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can test with very simple application that blinks LED for example.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please include all commands you use to generate bootloader testing and to program the hex files.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>