<?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>How to programmatically determine available FLASH space?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49669/how-to-programmatically-determine-available-flash-space</link><description>Hello, 
 I&amp;#39;ve read the answers to how to *calculate* available amount of FLASH space, based on the size of SoftDevice, Application, and Bootloader. However, they did not help me find an answer to the question: How to determine programmatically in real</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Jul 2019 06:44:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49669/how-to-programmatically-determine-available-flash-space" /><item><title>RE: How to programmatically determine available FLASH space?</title><link>https://devzone.nordicsemi.com/thread/200189?ContentTypeID=1</link><pubDate>Wed, 24 Jul 2019 06:44:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab047d12-36fe-497b-b3cf-93a04859f6e3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Correct,&amp;nbsp;&lt;span&gt;&amp;nbsp;(&lt;/span&gt;&lt;span&gt;FDS_VIRTUAL_PAGES *&amp;nbsp;&lt;/span&gt;&lt;span&gt;FDS_VIRTUAL_PAGE_SIZE) should be less than or equal to&amp;nbsp;NRF_DFU_APP_DATA_AREA_SIZE as you said.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_bootloader.html?cp=5_1_3_5_0_7#lib_bootloader_memory"&gt;NRF_DFU_APP_DATA_AREA_SIZE&lt;/a&gt; lets you reserve data in the same region that FDS uses by default.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to programmatically determine available FLASH space?</title><link>https://devzone.nordicsemi.com/thread/200162?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 21:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f706982e-a2b5-419d-9549-cae9f856769c</guid><dc:creator>Mike_K</dc:creator><description>&lt;p&gt;Thanks so much.&lt;br /&gt;I&amp;#39;d like to clarify how does&amp;nbsp;&lt;span style="font-weight:400;"&gt;NRF_DFU_APP_DATA_AREA_SIZE (in bootloader) should then relate to&amp;nbsp;FDS_VIRTUAL_PAGES and&amp;nbsp;FDS_VIRTUAL_PAGE_SIZE (in application)&lt;br /&gt;&lt;br /&gt;Is it ok to assume that (&lt;span&gt;FDS_VIRTUAL_PAGES *&amp;nbsp;&lt;/span&gt;&lt;span&gt;FDS_VIRTUAL_PAGE_SIZE) should be less than or equal to NRF_DFU_APP_DATA_AREA_SIZE?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;Both sets of defines deal with the same FLASH area, is that correct?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to programmatically determine available FLASH space?</title><link>https://devzone.nordicsemi.com/thread/199419?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2019 06:59:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4506798-31fc-454b-95eb-a253ee5ea645</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;There is a setting in the secure bootloader project (NRF_DFU_APP_DATA_AREA_SIZE) that tells the bootloader to not touch the memory area directly below it.&lt;/p&gt;
&lt;p&gt;This is intended to specifically save the FDS area from being overwritten by the bootloader. So if you release an application update where the FDS area has grown, you should accompany it with a bootloader update that knows about the new data area size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to programmatically determine available FLASH space?</title><link>https://devzone.nordicsemi.com/thread/199391?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2019 02:13:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffeb687e-237e-4143-899f-ef198fad7b45</guid><dc:creator>Mike_K</dc:creator><description>&lt;p&gt;In case I update the application/bootloader or both through DFU, and the application has grown, there is a potential, that the DFU will overwrite data stored in flash by FDS earlier.&lt;/p&gt;
&lt;p&gt;What guidelines would you suggest for cases like this? There is some data that I cannot afford to lose. What is a method of making sure that that data does not get overwritten by DFU of larger image?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to programmatically determine available FLASH space?</title><link>https://devzone.nordicsemi.com/thread/198185?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 13:14:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:634f59a2-be43-463c-9d6f-8e287700de91</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use linker symbols and maybe the bootloader start address (if you have one) to determine how much FLASH you have available. Macros for&amp;nbsp;using the linker symbols can be found in app_util.h. &amp;quot;CODE_SIZE&amp;quot; will for instance return the size of the app you are building and is set at link time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>