<?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>Firmware flashing using JLinkExe</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8122/firmware-flashing-using-jlinkexe</link><description>I&amp;#39;m using JLinkExe ( J link commander ) for Linux to flash the application firmware on NRF51822_QF_AA target. The following have worked so far, but I&amp;#39;d like to confirm and have some doubts. The typical JLinkExe session invoked as root on my Linux system</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 20 Mar 2016 13:26:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8122/firmware-flashing-using-jlinkexe" /><item><title>RE: Firmware flashing using JLinkExe</title><link>https://devzone.nordicsemi.com/thread/29157?ContentTypeID=1</link><pubDate>Sun, 20 Mar 2016 13:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29397134-1e0b-49eb-b364-d37d74e6b959</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;There is a little better: copy file 99-jlink.rules (part of the downloaded package) into /etc/udev/rules.d/ and it should work like a charm&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Firmware flashing using JLinkExe</title><link>https://devzone.nordicsemi.com/thread/29156?ContentTypeID=1</link><pubDate>Mon, 13 Jul 2015 04:16:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f77b84e5-9e7c-4bc2-8c29-c30a71c14d18</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;This link tells you how to setup a jlink script via Makefile: &lt;a href="https://devzone.nordicsemi.com/blogs/22/getting-started-with-nrf51-development-on-mac-os-x/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Firmware flashing using JLinkExe</title><link>https://devzone.nordicsemi.com/thread/29155?ContentTypeID=1</link><pubDate>Sat, 11 Jul 2015 12:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76650d14-82f8-4c80-8d3b-37ec0af29524</guid><dc:creator>sidekick</dc:creator><description>&lt;p&gt;Thanks a ton @PrithviRaj Narendra for the detailed information. You also provided information about flashing softdevice. So far, I&amp;#39;ve been using nRFStudio on Windows to flash Softdevice. I&amp;#39;ll soon try what you have suggested.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Firmware flashing using JLinkExe</title><link>https://devzone.nordicsemi.com/thread/29154?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2015 21:51:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18be6bd9-03c7-489c-98ed-396d82467e60</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;If you see the datasheet &lt;em&gt;w4 4001e504 1&lt;/em&gt; means that 1 is written to the NVMC Config register, meaning write is enabled to the flash memory. This is necessary to write the binary to the flash by JLink.&lt;/p&gt;
&lt;p&gt;If you use a SoftDevice, the location that you flash the binary that you compile is at the address that you mentioned. Without Softdevice the binary must be flashed at location 0.&lt;/p&gt;
&lt;p&gt;Overall, with Softdevice follow the steps below:&lt;/p&gt;
&lt;p&gt;First you need to extract the uicr part and the rest of binary from the softdevice hex file. So run these two commands&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[path to the toolchain]/arm-none-eabi-objcopy -Iihex -O binary --remove-section .sec3 [softdevice.hex] _mainpart.bin
[path to the toolchain]/arm-none-eabi-objcopy -Iihex -O binary --only-section .sec3 [softdevice.hex] _uicr.bin
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace text in [] with appropriate paths.&lt;/p&gt;
&lt;p&gt;Next flash these binaries in the appropriate location. For this with JLink&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set device to nrf51822&lt;/li&gt;
&lt;li&gt;Set speed to 1000 (or any other that works)&lt;/li&gt;
&lt;li&gt;w4 4001e504 1&lt;/li&gt;
&lt;li&gt;loadbin [path]/_mainpart.bin 0&lt;/li&gt;
&lt;li&gt;loadbin [path]/_uicr.bin 0x10001000  (I wonder why this address ;) )&lt;/li&gt;
&lt;li&gt;loadbin [path]/_your_binary.bin 0x16000&lt;/li&gt;
&lt;li&gt;r&lt;/li&gt;
&lt;li&gt;g&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Making this a script for JLink is convenient. Even better is letting your Makefile create this script and run it with your generated binary. Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>