<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso SDKのトピックRe: Optimization in MCUXpresso</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1845724#M4706</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203094"&gt;@Dhaya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In theory, functionality will not be affected by optimization. As you said, the functionality has been affected due to the possibility of variables in the function being optimized.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 03:33:32 GMT</pubDate>
    <dc:creator>Harry_Zhang</dc:creator>
    <dc:date>2024-04-12T03:33:32Z</dc:date>
    <item>
      <title>Optimization in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1842900#M4694</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Here we using LPC55s16 for the project. After completion of 80% memory, tried to optimize the project with &lt;STRONG&gt;optimize most (-O3&lt;/STRONG&gt;) and by &lt;STRONG&gt;optimize for size (-Os)&lt;/STRONG&gt;. After the optimization of the project, while executing the code half of the project get collapsed and not works well as like before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; We observed that some global variables, which are works well without optimization and after optimization those variable not get updated in case using in multiple files. But if we use the variable with the declaration of &lt;STRONG&gt;volatile&lt;/STRONG&gt; its words well.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Mainly while optimization, project size get reduced by the 20-25%. So we have reduce the size. What actually happens, while optimization of the project. Kindly resolve this issue.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2024 06:05:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1842900#M4694</guid>
      <dc:creator>Dhaya</dc:creator>
      <dc:date>2024-04-09T06:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1844805#M4702</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203094"&gt;@Dhaya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This table shows the optimization strategies corresponding to different optimization levels.&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="25px"&gt;Optimization level&lt;/TD&gt;
&lt;TD width="50%" height="25px"&gt;Strategy Explanation&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="47px"&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;-O0&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="50%" height="47px"&gt;No optimization is performed (if no optimization level is specified, it is set by default).&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="113px"&gt;-O1&lt;/TD&gt;
&lt;TD width="50%" height="113px"&gt;On the premise of not affecting compilation speed, try to use some optimization algorithms to reduce code size and improve the running speed of executable code.&lt;BR /&gt;-This level has executed 45 strategy sub items.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="135px"&gt;-O2&lt;/TD&gt;
&lt;TD width="50%" height="135px"&gt;Sacrifice some compilation speed and adopt optimization algorithms supported by almost all target configurations to improve the running speed of the target code.&lt;BR /&gt;-This level adds 48 strategy sub items above all optimization strategy sub items in - O1.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="179px"&gt;-O3&lt;/TD&gt;
&lt;TD width="50%" height="179px"&gt;Adopting many vectorization algorithms to improve the parallel execution level of code, such as utilizing pipelines, cache, etc. in modern CPUs, the goal is to increase the size of the target code rather than desperately improve the running speed.&lt;BR /&gt;-This level adds 16 strategy sub items above all optimization strategy sub items in - O2.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="157px"&gt;-Os&lt;/TD&gt;
&lt;TD width="50%" height="157px"&gt;There is a similarity between - O3 and - O3, but their goals are different. This level is to minimize the size of the target code, which is very important for devices with small storage capacity.&lt;BR /&gt;-This level subtracted 6 strategy sub items from all optimization strategy sub items of - O2, and then enabled the - inline functions strategy.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD height="25px"&gt;-Og&lt;/TD&gt;
&lt;TD height="25px"&gt;
&lt;P&gt;Provide reasonable optimization levels while maintaining fast compilation and a good debugging experience.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 05:45:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1844805#M4702</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2024-04-11T05:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1844956#M4704</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/229957"&gt;@Harry_Zhang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for the detailed info. Is any changes in the functionality in the program during different optimizations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note : This doubt raised because of that volatile and non-volatile&amp;nbsp; variables functioning differently during non-optimized and optimized projects&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 08:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1844956#M4704</guid>
      <dc:creator>Dhaya</dc:creator>
      <dc:date>2024-04-11T08:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1845724#M4706</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203094"&gt;@Dhaya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In theory, functionality will not be affected by optimization. As you said, the functionality has been affected due to the possibility of variables in the function being optimized.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Hang&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 03:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1845724#M4706</guid>
      <dc:creator>Harry_Zhang</dc:creator>
      <dc:date>2024-04-12T03:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1848961#M4715</link>
      <description>Thanks. During optimization which variable is recommended for global and extern. Is normal or volatile variable</description>
      <pubDate>Wed, 17 Apr 2024 10:11:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1848961#M4715</guid>
      <dc:creator>Dhaya</dc:creator>
      <dc:date>2024-04-17T10:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1849012#M4716</link>
      <description>&lt;P&gt;I think you have a bigger problem, called 'reentrancy'. See&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Reentrancy_(computing)" target="_blank"&gt;https://en.wikipedia.org/wiki/Reentrancy_(computing)&lt;/A&gt;&amp;nbsp;or other articles. The concepts around reentrancy are well understood and should be part of any software engineering curriculum.&lt;/P&gt;&lt;P&gt;'Volatile' is intended to tell the compiler that read/write accesses have side effects, e.g. because they are hardware registers. If you have to use 'volatile' as a workaround as it seems here, the problem is that your code is wrong and not reentrant (or not thread-safe or not interrupt-safe).&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 11:38:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Optimization-in-MCUXpresso/m-p/1849012#M4716</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2024-04-17T11:38:29Z</dc:date>
    </item>
  </channel>
</rss>

