<?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>NCS-Zephyr - West flashes zephyr.bin instead of merged hex</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67288/ncs-zephyr---west-flashes-zephyr-bin-instead-of-merged-hex</link><description>I am using NCS-Zephyr, Zephyr version 2.3.0-rc1. If you need to know the NCS version too, please can you include how I can find this? 
 
 When I do west flash normally (which uses the nrfjprog runner), it properly flashes my device with the correct merged_nrf52dk_nrf52832</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Oct 2020 13:05:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67288/ncs-zephyr---west-flashes-zephyr-bin-instead-of-merged-hex" /><item><title>RE: NCS-Zephyr - West flashes zephyr.bin instead of merged hex</title><link>https://devzone.nordicsemi.com/thread/275644?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 13:05:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68f5eed7-21a3-4c61-8d91-5785595a3aa1</guid><dc:creator>Simon</dc:creator><description>[quote user=""]I am using NCS-Zephyr, Zephyr version 2.3.0-rc1. If you need to know the NCS version too, please can you include how I can find this?[/quote]
&lt;p&gt;&amp;nbsp;Do the following in a terminal to figure out what version of NCS (nrf) you are using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd &amp;lt;installation folder&amp;gt;ncs/nrf
git status

// I get this when running the above. And in my case I&amp;#39;m on NCS v1.3.0
//  $ git status
//  HEAD detached at v1.3.0
//  ...&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]When I do &lt;code&gt;west flash&lt;/code&gt; normally (which uses the nrfjprog runner), it properly flashes my device with the correct&amp;nbsp;&lt;span&gt;&lt;code&gt;merged_nrf52dk_nrf52832.hex.&lt;/code&gt; When I use the J-link runner, by doing&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;code&gt;west -v flash --erase --runner jlink&lt;/code&gt; it flashes &lt;code&gt;zephyr.bin&lt;/code&gt; and does not boot properly or even run my code. It needs to flash the merged hex like nrfjprog. Do you know how I can fix this?&amp;nbsp;&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;Could you try to run the following (you may have to install the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download"&gt;nRF Command Line Tools&lt;/a&gt;, which includes nrfjprog):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd &amp;lt;application folder&amp;gt;/build/zephyr
nrfjprog --program merged.hex --sectorerase&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If your application/sample don&amp;#39;t contain any child images, use zephyr.hex instead.&lt;/p&gt;
&lt;p&gt;By the way, how did you generate a hex file on the form merged_&amp;lt;board&amp;gt;.hex? I&amp;#39;m not seeing it when I build using NCS v1.3.0. What sample do you use? I am not sure&amp;nbsp;if there are any difference between this file and the merged.hex file.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Christian Holland"]I don&amp;#39;t know enough about what the merged hex actually is, but I thought it was a combination of the bootloader and my images and child-images, so should i specify 0x000 instead?[/quote]
&lt;p&gt;The merged.hex file should always get programmed onto location 0x00, since it contains all the images.&amp;nbsp;When the chip boots up, it will&amp;nbsp;start running at adress 0x00. The nrfjprog command above should program it to this location automatically.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;some additional information: If your aplication only contains the main application itself (no spm or mcuboot), the application starts at 0x00. If the application contains an SPM, the SPM is located on address 0x00. If the application contains mcuboot and spm, the mcuboot is located first on address 0x00.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You could check out the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nc_programmer%2FUG%2Fnrf_connect_programmer%2Fncp_introduction.html"&gt;Programmer app&lt;/a&gt;&amp;nbsp;in &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-desktop"&gt;nRF Connect for Desktop&lt;/a&gt;, which gives a nice visual overview of how the different images are placed in flash.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS-Zephyr - West flashes zephyr.bin instead of merged hex</title><link>https://devzone.nordicsemi.com/thread/275305?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 09:53:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb5a76bf-d9e8-486b-9060-bda042328d7e</guid><dc:creator>Christian Holland</dc:creator><description>&lt;p&gt;Could you also tell me the address that the merged.hex should be flashed to in the J-Link runner? I have this currently (and it seems to work):&lt;/p&gt;
&lt;p class="p1"&gt;&lt;code&gt;&lt;span class="s1"&gt;loadfile /home/pi/flash/merged_nrf52dk_nrf52832.hex 0xc000&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know enough about what the merged hex actually is, but I thought it was a combination of the bootloader and my images and child-images, so should i specify 0x000 instead?&lt;/p&gt;
&lt;p class="p1"&gt;&lt;code&gt;&lt;span class="s1"&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>