<?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>Upload .hex on nrf52 in Makefile</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8059/upload-hex-on-nrf52-in-makefile</link><description>Hi, 
 for development i am using gcc and makefile on osx.
I wanted to automate my makefile with the possibility to upload directly the hex file to my nrf52 devboard. 
 All Makefiles from Nordic using nrfjprog in this case, but i am running osx. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Oct 2016 21:04:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8059/upload-hex-on-nrf52-in-makefile" /><item><title>RE: Upload .hex on nrf52 in Makefile</title><link>https://devzone.nordicsemi.com/thread/28893?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 21:04:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62c59d74-2782-49f8-a4bd-3731814e7aa7</guid><dc:creator>Tanasis!</dc:creator><description>&lt;p&gt;While using DFU and with respect to this: &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Flib_bootloader.html&amp;amp;anchor=lib_bootloader_programming"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;
&lt;strong&gt;nRF51&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the softdevice no longer starts at 0x0 right, but at 0x1000?&lt;/li&gt;
&lt;li&gt;Or it starts at 0x0 since the MBR is part of the Softdevice?&lt;/li&gt;
&lt;li&gt;And the application starts at 0x0001 B000?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upload .hex on nrf52 in Makefile</title><link>https://devzone.nordicsemi.com/thread/28892?ContentTypeID=1</link><pubDate>Mon, 26 Oct 2015 11:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c3537f0-67b2-4bd6-98f1-9d1fc6722031</guid><dc:creator>Henrik M.</dc:creator><description>&lt;p&gt;Wow, I&amp;#39;ve been looking for exactly this for days! :) Thanks @stian!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upload .hex on nrf52 in Makefile</title><link>https://devzone.nordicsemi.com/thread/28891?ContentTypeID=1</link><pubDate>Thu, 09 Jul 2015 20:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10b3acff-ec21-438e-9867-799b32080c70</guid><dc:creator>Nils Minor</dc:creator><description>&lt;p&gt;Thanks, this worked for me :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upload .hex on nrf52 in Makefile</title><link>https://devzone.nordicsemi.com/thread/28890?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2015 11:02:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ac18454-93f8-473b-a055-1a9609085e70</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;To erase the chip you have to enable erase and erase using the NVMC. It is documented here: &lt;a href="http://infocenter.nordicsemi.com/topic/nrf52.v1.7/Chunk208541660.html?cp=1_1_0_8#concept_pcl_wbz_vr"&gt;infocenter.nordicsemi.com/.../Chunk208541660.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That would be:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;w4 4001e504 2  #CONFIG register, enable erase
w4 4001e50c 1  #ERASEALL register
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To flash the softdevice you can write:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;loadbin $SOFTDEVICE 0x0  #flash in address location 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To flash the application you can write:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;loadbin $APPLICATION 0x1f000  #flash in address location 0x1f000  (s132_nrf52_1.0.0-2.alpha version)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A script to erase, flash SD, flash application and reset would look something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;device nrf52
speed 1000
w4 4001e504 2
w4 4001e50c 1
sleep 100
r
loadbin $SOFTDEVICE 0x0
loadbin $APPLICATION 0x1f000
sleep 100
r
g
exit
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Upload .hex on nrf52 in Makefile</title><link>https://devzone.nordicsemi.com/thread/28889?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2015 09:09:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80e6d864-b12c-4cc9-af03-b92100a00a98</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;Not a complete answer for you, but a tip: The new development kits will show up as a block device/flash drive when connected. It is possible to copy a file to this folder, and it will automatically be flashed and the device reset. Is this something you could use? This would need you to merge the hex files in advance though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>