<?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>Read and write specific flash pages from a computer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27428/read-and-write-specific-flash-pages-from-a-computer</link><description>I want to read and write certain pages from the NRF52 flash via nrfjprog. The goal is to debug an issue with the peer manager by saving the FDS flash contents to disk. I would also want to restore the contents of the FDS flash from the previous saved</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Nov 2017 00:04:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27428/read-and-write-specific-flash-pages-from-a-computer" /><item><title>RE: Read and write specific flash pages from a computer</title><link>https://devzone.nordicsemi.com/thread/108323?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2017 00:04:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cc6163e-df91-4499-a3ea-75e1eb578e10</guid><dc:creator>rct42</dc:creator><description>&lt;p&gt;@shibshab: thanks for sharing these scripts. However, I had issues running these on my PC (it gave me &amp;quot;no such command &amp;quot;read&amp;quot;&amp;quot;) and decided it would be quicker for me to roll a script of my own. It looks like your scripts do quite a lot more than I need and I&amp;#39;ll bookmark them for future reference!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read and write specific flash pages from a computer</title><link>https://devzone.nordicsemi.com/thread/108324?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 23:56:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e12fed2-1d39-4c71-8419-8a011d52d1e1</guid><dc:creator>rct42</dc:creator><description>&lt;p&gt;I&amp;#39;ve solved my problem with a custom python script and thought others might find it useful. The script can be downloaded here: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/jflashrw.py"&gt;jflashrw.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Reading FDS: &lt;code&gt;jflashrw.py read --start 0x6F000 --length 0x4000 --file fds.bin&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Writing FDS: &lt;code&gt;jflashrw.py write --start 0x6F000 --length 0x4000 --file fds.bin&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Change the start address and the length as appropriate for your project (mine has a bootloader that starts at 0x73000 and has four pages for FDS). This script can also be used to read/write other parts of flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Read and write specific flash pages from a computer</title><link>https://devzone.nordicsemi.com/thread/108322?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 07:21:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75b4b33f-0879-42cb-b988-38752ac5a2c6</guid><dc:creator>shibshab</dc:creator><description>&lt;p&gt;Not a proper answer to what you are asking for, but it might help you out.&lt;/p&gt;
&lt;p&gt;Attached is three python files which I think does what you want. It supports dumping the fds data to .yaml .bin or .hex format. Note that this is just something I made for my own use, and it is not supported by anyone and it may break and stop working. You need to have pynrfjprog installed for it to work. &lt;a href="https://github.com/NordicSemiconductor/pynrfjprog"&gt;github.com/.../pynrfjprog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use the command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;python fds_reader.py read --source 682354148 --dest lol.yaml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To read the fds data from the kit to lol.yaml.&lt;/p&gt;
&lt;p&gt;The idea was to support reading the fds data from the device to a human modifiable format, change the data, and the write the new data back to the device with updated CRC, however this does not work at the moment.&lt;/p&gt;
&lt;p&gt;Copy these three files somewhere to be able to run the command. Note: It will only work on windows for now, to change this, just change remove the entire &amp;quot;auto detect devices&amp;quot; functionality.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/fds_5F00_device_5F00_discovery.py"&gt;fds_device_discovery.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrfmap.py"&gt;nrfmap.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/fds_5F00_reader.py"&gt;fds_reader.py&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>