<?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>How does the nrfjprog know the addresses of area to program?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12073/how-does-the-nrfjprog-know-the-addresses-of-area-to-program</link><description>I&amp;#39;m curious. I believe I can set it up in the keil &amp;quot;options-&amp;gt;target&amp;quot; tab. 
 I get it that as long as I don&amp;#39;t cause the softdevice and my program to &amp;quot;overlap&amp;quot;, it is fine, but I
clearly cannot guarantee there wouldn&amp;#39;t be a huge &amp;quot;gap&amp;quot; between the ending</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Feb 2016 07:25:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12073/how-does-the-nrfjprog-know-the-addresses-of-area-to-program" /><item><title>RE: How does the nrfjprog know the addresses of area to program?</title><link>https://devzone.nordicsemi.com/thread/45689?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2016 07:25:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe318b06-352c-4db0-8bbd-245253ff0e20</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The firmware you supply to nrfjprog (no matter if it is application, SoftDevice, bootloader or something else) is in &lt;a href="https://en.wikipedia.org/wiki/Intel_HEX"&gt;Intel HEX&lt;/a&gt; format. This file contains the address along with the data. This means that the addresses are decide when you build the hex file, and not by nrfjprog.&lt;/p&gt;
&lt;p&gt;If you change the start address of your application in Keil, you will see that the hex file changes accordingly (note that just moving your application to a random address will make it fail, as it of course has to be in the expected location, but you can do it to see how the hex file works.&lt;/p&gt;
&lt;p&gt;If you analyze the hex file in a editor you should note that in addition to the address field of every line (byte second and third byte) there is often a shorter line with record type (byte four) Extended Linear Address. This specify the upper 16 bits of the 32-bit absolute address for all subsequent data records. For example, this is always needed for the application hex file when the SoftDevice is used, as the address will be higher than 16 bit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>