<?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>nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91531/nrf51822-how-to-properly-define-flash-region-boundaries-in-the-case-secure-bootloader-is-used</link><description>Hello, guys. 
 We are using nRF51822 SoC together with nRF5 v12.3.0 SDK. 
 According to the nRF51822 memory layout , half of the 256KB flash memory space is taken by the Softdevice, MBR, and Bootloader. 
 
 The other half (~127KB) is at our disposal for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Sep 2022 08:36:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91531/nrf51822-how-to-properly-define-flash-region-boundaries-in-the-case-secure-bootloader-is-used" /><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/385447?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 08:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca9718df-ff2f-4b59-8e4b-bea56624141e</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Thank you, &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt; !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/385196?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 08:37:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:783b770c-12ec-4c16-baad-c5445e3ac403</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, if you adjust for the FDS data in the linker script as well, you will get a linker error if your application grows into the space that will be used by FDS. So that sounds like a good idea.&lt;/p&gt;
[quote user="bojan"]Our FDS module contains 3 blocks of 1kB each so I suppose 3kB will be taken by FDS. What about PM, how can we figure out what is size needed for the PM block?[/quote]
&lt;p&gt;The PM is a &amp;quot;user&amp;quot; of FDS, and will via FDS use these 3 blocks that FDS allocated for storing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/385000?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 11:06:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a21dd6f-5daf-4ef0-bc63-224650a604e9</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the application compilation report does NOT contain Application Data (PM/FDS), this would mean that we need to take into account the size of the Application Data area when defining available FLASH space for the application in the linker script. Please confirm.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1662548564469v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;How we can know the size of the Application data area? Our FDS module contains 3 blocks of 1kB each so I suppose 3kB will be taken by FDS. What about PM, how can we figure out what is size needed for the PM block?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/384968?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 09:12:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99577785-aef6-45bc-9697-5096f52f61d8</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="bojan"]Are the data stored by those two modules (Peer Manager and FDS module) already accounted for in the application compilation report (already in the application space)?[/quote]
&lt;p&gt;No, as far as I can see it is not. PM/FDS claims this area at run-time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/384647?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 15:43:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0520f404-a38a-401e-9818-5c5811a6af78</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Thanks for your reply, &lt;a href="https://devzone.nordicsemi.com/members/sigurdon"&gt;Sigurd&lt;/a&gt; !&lt;/p&gt;
&lt;p&gt;We are indeed using both Peer Manager and FDS module with the following settings:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#ifndef FDS_VIRTUAL_PAGES
#define FDS_VIRTUAL_PAGES 3
#endif

#ifndef FDS_VIRTUAL_PAGE_SIZE
#define FDS_VIRTUAL_PAGE_SIZE 1024
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are the data stored by those two modules (Peer Manager and FDS module) already accounted for in the application compilation report (already in the application space)?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1662392354342v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If affirmative, then we don&amp;#39;t need to leave any space between our application space and the bootloader area. If negative, I am afraid we would need to account for Peer Manager and FDS areas.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Bojan.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/384644?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 15:28:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09771906-42fb-4aeb-96fb-8b16594ba8ef</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Now, in the case we are using a secure Bootloader, do we need to properly adjust the FLASH region size in a linker script of our application so that only &lt;span style="background-color:rgba(204, 255, 204, 1);"&gt;&lt;strong&gt;0x1B000 - 0x3AC00&lt;/strong&gt;&lt;/span&gt; FLASH region is at our disposal for storing the application code, constants, and initialized/uninitialized data?[/quote]
&lt;p&gt;Yes, I see the buttonless DFU example started doing that from SDK 13, so yes, I would modify it to compensate for the bootloader. i.e. set it to&amp;nbsp;0x1FC00&lt;/p&gt;
[quote user=""]Should we reserve any flash memory area between the application and bootloader to serve some purpose (that we are currently unaware of)?[/quote]
&lt;p&gt;If you use the Peer Manager/ FDS module, then data stored by this module(e.g. bonding information) will be placed at the end of the application space. The bootloader is aware of this, and will not overwrite data stored here during the DFU. You don&amp;#39;t need to do anything in your MEMORY configuration for this.See this page:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Flib_bootloader_dfu_banks.html&amp;amp;cp=8_5_10_3_5_1_2_2&amp;amp;anchor=lib_bootloader_dfu_appdata"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Flib_bootloader_dfu_banks.html&amp;amp;cp=8_5_10_3_5_1_2_2&amp;amp;anchor=lib_bootloader_dfu_appdata&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822: How to properly define FLASH region boundaries in the case secure Bootloader is used</title><link>https://devzone.nordicsemi.com/thread/384582?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2022 12:46:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e55d28ed-9c2e-42c7-9a12-d2b08e04726e</guid><dc:creator>bojan</dc:creator><description>&lt;p&gt;Hello, guys.&lt;/p&gt;
&lt;p&gt;Any suggestion?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>