<?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 to flash with JLink command line</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10896/how-to-flash-with-jlink-command-line</link><description>I have set up the gcc toolchain on Mac OSX to compile my BLE nRF51822 code and I tried to flash the code. Here are the 3 scenarios that I have tried (JlinkExe on Mac) 
 Case 1 : code compiled with Keil on Windows, is flashed (bootloader + softdevice</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Aug 2018 06:31:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10896/how-to-flash-with-jlink-command-line" /><item><title>RE: How to flash with JLink command line</title><link>https://devzone.nordicsemi.com/thread/143841?ContentTypeID=1</link><pubDate>Mon, 13 Aug 2018 06:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5977574d-bc6c-418d-aac9-ef561aab905a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;This is a thread from late 2015. Please create a new case if you have any questions.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to flash with JLink command line</title><link>https://devzone.nordicsemi.com/thread/143711?ContentTypeID=1</link><pubDate>Fri, 10 Aug 2018 11:50:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e940009-cdc2-48ad-afd3-7d86fe9e178e</guid><dc:creator>Logicare_test</dc:creator><description>&lt;p&gt;How to Lock a Device after load file successfully.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to flash with JLink command line</title><link>https://devzone.nordicsemi.com/thread/40753?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 14:54:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3b51c24-6b82-44a0-9540-f381e3bfc528</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;Instead of using the loadbin command use loadfile.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;loadfile s110_nrf51822_7.0.0_softdevice.hex
loadfile app_mac.hex&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Notice that you don&amp;#39;t include any address when loading a hex file. This comes to the problem you were seeing: a .hex file has more info than just binary data to be loaded into memory. Info like the addresses where data should be loaded etc.. So you don&amp;#39;t need to specify an address offset for hex files when programming them because this info. is included in the hex file.&lt;/p&gt;
&lt;p&gt;In case 1 you were reading back memory from the device so you would read back a binary file (just pure data). And thats why this worked. (even though you then saved it as a .hex file extension).&lt;/p&gt;
&lt;p&gt;In case 2 and 3 you actually had a hex file (Intel hex) which has more info and this probably screwed up JLink&amp;#39;s loadbin as it was expecting binary data and got something else. (I guess Jlink didnt check that this was actually a .bin file)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>