<?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>Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/12163/programming-with-pynrfjprog</link><description>Hi, 
 I have a python scipt that uses pynrfjprog to program some custom information into a board&amp;#39;s flash to be used by my application (calibration parameters, serial number etc). 
 I&amp;#39;d like to customise this to also program the softdevice, application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Feb 2016 16:12:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/12163/programming-with-pynrfjprog" /><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46033?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 16:12:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ddc48cb-f57d-40c1-8783-854feee94106</guid><dc:creator>Michael Allan</dc:creator><description>&lt;p&gt;Got it - the latest nrfjprog doesn&amp;#39;t even mention that flag. I&amp;#39;ll try it out, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46032?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 16:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d01e3f3-93c8-4ba7-9545-33ac4d425068</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;I&amp;#39;m sure there is a new and improved way of doing this. I&amp;#39;ve always just written that flag but I&amp;#39;ve never done any of this with memory protection, I&amp;#39;m sure tons of people have though and its prob all over dev zone/infocenter&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46031?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 16:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b30d05e-02c6-4bc2-ba03-cee07ba7a4a3</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;OK your nrfjprog is really old. That does make sense though. I&amp;#39;m really not sure but what I can tell you is this flag has been discontinued so I would suggest updating nrfjprog (we are v8.3 now) and just doing a quick search on dev zone to make sure memory protection wont interfere. But your call, I can&amp;#39;t help you here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46030?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 15:45:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:039ba4a3-fbd6-4805-b2fe-a755958c0705</guid><dc:creator>Michael Allan</dc:creator><description>&lt;p&gt;Not quite:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;C:\&amp;gt;nrfjprog -v
nrfjprog Version: 5.2.0.45203

C:\nrfjprog --help
&amp;lt;&amp;lt;snip&amp;gt;&amp;gt;
     --programs &amp;lt;hex_file&amp;gt; [--dfu]                Programs the specified hex
                         into the device. In addition, checks that the
                         hex file is a well constructed SoftDevice:
                         It contains a the FWID either in the UICR or
                         the SoftDevice itself, it contains a valid
                         value for the length of the SoftDevice, does
                         not contain any data above the afore mentioned
                         length, and only writes into SoftDevice
                         reserved space in UICR. Can be combined with
                         the erase operations, the reset operations and
                         the other programming operations. If dfu option
                         is given and the SoftDevice allows it, the
                         device will not be run time protected. otherwise,
                         the UICR.CLENR0 will be written. It will
                         automatically disable the MPU NVM protection
                         regions if enabled and enable it again after the
                         program operation.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;ve read that the &lt;code&gt;--dfu&lt;/code&gt; flag is needed to enable DFU update of the SoftDevice?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46029?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 15:42:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d69c4b32-20d5-4af9-9adf-a4dd382d9d2e</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;What version of nrfjprog are you using? I&amp;#39;m not sure what the --dfu flag is.&lt;/p&gt;
&lt;p&gt;I guess it is to write the settings flag so you can flash the bootloader, softdevice and appliation (and not have to upload appliation by DFU OTA). This can be accomplished by doing a memory write after programming the softdevice.&lt;/p&gt;
&lt;p&gt;write_u32(0x3FC00, 0x01) # I&amp;#39;m guessing the address. this is for nRF51 - based on memory. nrf52 is different.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46028?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 14:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40f7e39-2699-493f-8d29-3fbce9906d53</guid><dc:creator>Michael Allan</dc:creator><description>&lt;p&gt;What about if the --dfu flag is being used in nrfjprog?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Programming with pynrfjprog</title><link>https://devzone.nordicsemi.com/thread/46027?ContentTypeID=1</link><pubDate>Fri, 26 Feb 2016 14:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2099c12-5697-4293-a2c2-018fb2226ced</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;Yes there is. There is an examples folder when you install pynrfjprog here C:\Python27\Lib\site-packages\pynrfjprog\examples&lt;/p&gt;
&lt;p&gt;program_multiple_hex_file.py does this for you and should work out of the box. I attached it as well.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/program_5F00_multiple_5F00_hex_5F00_files.py"&gt;program_multiple_hex_files.py&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>