<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>Flash Write Using Code</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/21788/flash-write-using-code</link><description> 
My Flash Write Library is working fine when iam using Level 8
Optimization in Keil Compilor but when i use constant folding(Level
0) it was not working kindly give me a solution. 

 
Thanks in Advance 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Flash Write Using Code</title><link>https://community.arm.com/thread/100200?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2008 01:09:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:794271e9-b7d0-4f87-b138-abace3971ec9</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;you should never write software timing loops in a high-level
language&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
That is, not if you want any sort of guarantee of the timing- see:
&lt;a target="_blank" href="http://www.8052.com/forum/read.phtml?id=149030"&gt;www.8052.com/.../read.phtml&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Write Using Code</title><link>https://community.arm.com/thread/88843?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2008 00:45:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5c54c388-32d6-443c-aa4b-bb9ced9dd263</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;...working fine when iam using Level 8 Optimization in Keil
Compiler but when i use constant folding (Level 0) it was
not&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Remember that each higher optimisation level &lt;i&gt;includes&lt;/i&gt; all
the lower-level optimisations: &lt;a href="http://www.keil.com/support/man/docs/c51/c51_optimize.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_optimize.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Therefore, Level-8 &lt;i&gt;&lt;b&gt;includes&lt;/b&gt;&lt;/i&gt; constant folding.&lt;/p&gt;

&lt;p&gt;
You need to reduce the optimisation a step at a time to determine
where it actually stops working - and then examine the differences
between the generated code at that point.&lt;/p&gt;

&lt;p&gt;
Could you be using software delay loops, and these end up just
being too slow at the lower optimisation?&lt;br /&gt;
(this is why you should &lt;i&gt;&lt;b&gt;never&lt;/b&gt;&lt;/i&gt; write software timing
loops in a high-level language)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Write Using Code</title><link>https://community.arm.com/thread/49333?ContentTypeID=1</link><pubDate>Sun, 27 Jan 2008 23:27:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4971a0fc-11b2-4969-b5f0-5e335b8599e7</guid><dc:creator>C51 FREAK</dc:creator><description>&lt;p&gt;&lt;p&gt;
Simple solution; don&amp;#39;t use constant folding (Level 0) ;)&lt;/p&gt;

&lt;p&gt;
Or, narrow down the problem by reducing the code to an absolute
minimum while still exhibiting the fault and look at the code
produced to determine whether it is a compiler problem or a coding
problem.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>