<?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>Bug in hrs example?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22608/bug-in-hrs-example</link><description>I want to use FDS in my application. Lets assume I do not have a bootloader. This is part of my linker script describing memory regions. 
 MEMORY
{
 FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000
 RAM (rwx) : ORIGIN = 0x200024b0, LENGTH = 0xdb50</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Jun 2017 10:23:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22608/bug-in-hrs-example" /><item><title>RE: Bug in hrs example?</title><link>https://devzone.nordicsemi.com/thread/88926?ContentTypeID=1</link><pubDate>Fri, 09 Jun 2017 10:23:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdc702c6-f8a1-4660-8a37-bd62695a8813</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I have updated my answer to answer your question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in hrs example?</title><link>https://devzone.nordicsemi.com/thread/88925?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 08:04:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56bcc0d0-504d-4346-b39b-d8a301b3b0ed</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Ok, I saw your answer but I already knew all of that. Let me put it other way on base of hrs example. Assume I have board with your hrs example. During life of application it saved some peer info via fds on flash (last 4 pages - 3 + 1 swap). Now application for some reason grew in size and now it has 0x61000 bytes. Flash region has exactly enough space for it. But at the end of the flash i have my fds pages ! I understand they will be overwritten when flashing application without any warning ! Isn&amp;#39;t that a bug ? Shouldn&amp;#39;t space for code be define as 0x6100 - fds_pages * 0x1000? What&amp;#39;s more when I flash my application it will run ok but on first write by fds it will overwrite its code giving unexpected behaviour and potentially a crash.&lt;/p&gt;
&lt;p&gt;To the point. As I wrote in post -  shouldn&amp;#39;t FLASH region be 0x5d00?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in hrs example?</title><link>https://devzone.nordicsemi.com/thread/88924?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 07:18:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5efe55d-3acf-46a8-8b1c-92af88278580</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;That memory section in the linker script tells which part of flash and RAM that is available for the application (including the FDS).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/140197/flash-data-storage-place-in-memory/?answer=141264#post-id-141264"&gt;This&lt;/a&gt; answer explains where FDS data will be stored in flash.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 09.06.2017:&lt;/strong&gt;
Yes, you are right, the application could potentially overwrite the FDS space. So yes, changing the compilation flash settings to exclude the FDS space is the right thing to do, and the flash region length should be 0x5D000.&lt;/p&gt;
&lt;p&gt;Note: FDS will not override the application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>