<?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>Virtual Page overwritten by application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86244/virtual-page-overwritten-by-application</link><description>Hello all! 
 I am currently developing on the development board nRF52832, SDK16.0 and SD132v7.2.0. 
 As mentioned in the subject the virtual pages are overwritten by the application. Due to this, the function &amp;quot;pages_init()&amp;quot; returns an error which leads</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Mar 2022 12:37:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86244/virtual-page-overwritten-by-application" /><item><title>RE: Virtual Page overwritten by application</title><link>https://devzone.nordicsemi.com/thread/360001?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 12:37:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a2a58e4-118e-43e1-92c7-4ce7297f133c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;MKarl,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;understand&amp;nbsp;the problem. When you remove optimization, the machine code matches closely to the C code, which makes it easy to step, watch variables etc, as what you see in the code is more or less what is actually in the binary. With optimization, the compiler will do tricks to try to achieve what it is supposed to focus on (smaller size, faster speed, etc), and then it is not at all easy to match the machine code to the C code. Therefore, you typically want to disable&amp;nbsp;optimization&amp;nbsp;when debugging.&lt;/p&gt;
&lt;p&gt;In this case, where you cannot fit everything there are a few things you can do:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simplest: Do you need 4 FDS pages when doing your testing or is it enough with 2 or 3?&lt;/li&gt;
&lt;li&gt;You can keep optimize for size for the project as a whole, and specifically use a different&amp;nbsp;optimization level for the files you are debugging in.
&lt;ul&gt;
&lt;li&gt;If you for&amp;nbsp;instance are using Segger Embedded Studio, you can right click on a file and select &amp;quot;Options...&amp;quot;. Then adjust the optimization level under &amp;quot;Code Generation&amp;quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>