<?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>Using Optimisation in nRF 51822 (Keil)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3851/using-optimisation-in-nrf-51822-keil</link><description>Hi, 
 I am using nRF51822 Evaluation Kit along with keil uvision4. Will using optimization in keil IDE make any problem in the normal working of BLE project? Will it affect the delay function ? My code size is nearly 35KB. I am using the Keil demo version</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 21 Sep 2014 04:09:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3851/using-optimisation-in-nrf-51822-keil" /><item><title>RE: Using Optimisation in nRF 51822 (Keil)</title><link>https://devzone.nordicsemi.com/thread/13888?ContentTypeID=1</link><pubDate>Sun, 21 Sep 2014 04:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d47747da-3569-4f55-bdc0-35a44d1d455e</guid><dc:creator>Shiju C G</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;thank you for the valuable reply.&lt;/p&gt;
&lt;p&gt;regards,&lt;br /&gt;
shiju&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Optimisation in nRF 51822 (Keil)</title><link>https://devzone.nordicsemi.com/thread/13887?ContentTypeID=1</link><pubDate>Sat, 20 Sep 2014 16:52:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73a15135-f81c-4204-97ce-bf718fdc48d8</guid><dc:creator>mnhs</dc:creator><description>&lt;p&gt;I ran out of characters, will continue here:&lt;/p&gt;
&lt;p&gt;I suggest to redesign it as those constructions are generally ineffective and can generate further errors. There maybe are scenarios where this cannot be performed but my general suggestion is to do it.&lt;/p&gt;
&lt;p&gt;Just a bit funny ending - Keil is in my opinion way too much expensive IDE to make those kinds of errors :-)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Optimisation in nRF 51822 (Keil)</title><link>https://devzone.nordicsemi.com/thread/13886?ContentTypeID=1</link><pubDate>Sat, 20 Sep 2014 16:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82d3e90a-d42c-4b0d-8580-3555129495d2</guid><dc:creator>mnhs</dc:creator><description>&lt;p&gt;Still, in that case, I don&amp;#39;t think that the Keil compiler is the one to blame. I have done a lot of projects not only in Keil but also in other development environments with 10000+ lines of code and various components and even though they are all heavily optimized, I have never encountered a problem.&lt;/p&gt;
&lt;p&gt;I would take a look at the code itself. The compiler is absolutely free to change your program as long as it preserves the so called &amp;quot;side effects&amp;quot; (please study Google more for further explanation). Thus, the code after optimization is far different from your original code. Let me give you an example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;for(i=0;i&amp;lt;64;i++) {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The compiler is absolutely free to remove this part of code because it does not create any side effects. There are many other examples of it. If your application depends somehow (i.e. creates a delay) on those constructions, I suggest to redesign it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Optimisation in nRF 51822 (Keil)</title><link>https://devzone.nordicsemi.com/thread/13885?ContentTypeID=1</link><pubDate>Sat, 20 Sep 2014 16:15:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b98f451-0b40-4a51-bf67-487dba052f3e</guid><dc:creator>scytulip</dc:creator><description>&lt;p&gt;It depends. My program cannot run properly after optimization......&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Optimisation in nRF 51822 (Keil)</title><link>https://devzone.nordicsemi.com/thread/13884?ContentTypeID=1</link><pubDate>Fri, 19 Sep 2014 10:22:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83c516e4-0b19-426d-b0e7-dfd35cc1cc14</guid><dc:creator>mnhs</dc:creator><description>&lt;p&gt;The optimization should not affect the normal working of the program. My projects which are also time-dependent work correctly using any level of optimization.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>