<?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>i.MX RT Crossover MCUsのトピックRe: MCUXpresso Compiler</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489494#M20605</link>
    <description>&lt;P&gt;What is the optimization level set at now?&lt;BR /&gt;&lt;BR /&gt;-O is what controls the optimization level.&amp;nbsp; If fiddling with that makes the code work, then there is usually something wrong with the code.&amp;nbsp; Static Analysis with something like Lint would find the issues.&lt;BR /&gt;&lt;BR /&gt;-O0 turns off all optimizations. -O2 is generally safest option. -O3 can be aggressive.&lt;BR /&gt;-Os for 'small' can also be aggressive in removing code that really might have been expected to stay like busy loops.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-O2 / 3 and -Os implicitly enable Strict Aliasing.&amp;nbsp; Try turning that off:&lt;BR /&gt;&lt;SPAN&gt;-fno-strict-aliasing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Turing off all optimizations can make code size explode and create other problems.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2022 12:24:39 GMT</pubDate>
    <dc:creator>bobpaddock</dc:creator>
    <dc:date>2022-07-14T12:24:39Z</dc:date>
    <item>
      <title>MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488750#M20566</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;I'm developing a project for i.MX RT 1024 and I have a compiler problem.&lt;/P&gt;&lt;P&gt;I have two pointers to different memory locations. In these location I have the same value. The compiler forces the pointers to point the same location.&lt;/P&gt;&lt;P&gt;I need that the two pointers address must different.&lt;/P&gt;&lt;P&gt;In MCUXpresso I added the falg "&lt;SPAN&gt;-fno-merge-all-constants&lt;/SPAN&gt;" in "Other Optimization flags" field of "MCU C Compiler-&amp;gt;Optimization", but it hasn't solved the problem.&lt;/P&gt;&lt;P&gt;Many thanks in advance for you support.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 12:32:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488750#M20566</guid>
      <dc:creator>chobin</dc:creator>
      <dc:date>2022-07-13T12:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488760#M20568</link>
      <description>&lt;P&gt;Can you show us how the pointers and what they point at are defined, please?&lt;BR /&gt;Is there anything going on with the Linker Script for these two memory sections?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 12:44:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488760#M20568</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2022-07-13T12:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488868#M20570</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I created two global pointers like these&lt;/P&gt;&lt;P&gt;char *pA = "123";&lt;/P&gt;&lt;P&gt;char *pB = "123";&lt;/P&gt;&lt;P&gt;I expeted that pA != pB, but pA == pB (because of the compiler optimization they pointer to the same memory area).&lt;/P&gt;&lt;P&gt;I'm using MCUXpresso 11.5 version.&lt;/P&gt;&lt;P&gt;The memory area for "123" value can be RAM or FLASH.&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;Kinds Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:19:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488868#M20570</guid>
      <dc:creator>chobin</dc:creator>
      <dc:date>2022-07-13T15:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488983#M20574</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I suggest two ways to do that.&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;    char tempBuffer[3];
    char* pA = &amp;amp;tempBuffer[0];
    /*or using the standard c library stdlib.h*/
    char* pB = (char *) malloc(3);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I hope this helps you, if not tell me for more information.&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Pavel&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 19:42:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1488983#M20574</guid>
      <dc:creator>Pavel_Hernandez</dc:creator>
      <dc:date>2022-07-13T19:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489256#M20595</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the problem is that I'm working with an old project&amp;nbsp; for kinetis K60 and developed using "CodeWarrior 10.6". In that case there wasn't the problem.&lt;/P&gt;&lt;P&gt;Now I have take this project and adapt it for IMXRT 1024. I changed the IDE (now is MCUXpresso 11.5.0) and I saw the situation that I described in the previous posts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can not search for all pointers that have in the project with this problem and modify them. So I'd like find a solution like disable the compiler optimization. Is it possible to follow this way?&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kinds Regards.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 07:25:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489256#M20595</guid>
      <dc:creator>chobin</dc:creator>
      <dc:date>2022-07-14T07:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489483#M20604</link>
      <description>&lt;P&gt;Four bytes need allocated to account for the string NULL byte.&lt;BR /&gt;That is why this type of code is fragile.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 12:16:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489483#M20604</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2022-07-14T12:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489494#M20605</link>
      <description>&lt;P&gt;What is the optimization level set at now?&lt;BR /&gt;&lt;BR /&gt;-O is what controls the optimization level.&amp;nbsp; If fiddling with that makes the code work, then there is usually something wrong with the code.&amp;nbsp; Static Analysis with something like Lint would find the issues.&lt;BR /&gt;&lt;BR /&gt;-O0 turns off all optimizations. -O2 is generally safest option. -O3 can be aggressive.&lt;BR /&gt;-Os for 'small' can also be aggressive in removing code that really might have been expected to stay like busy loops.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-O2 / 3 and -Os implicitly enable Strict Aliasing.&amp;nbsp; Try turning that off:&lt;BR /&gt;&lt;SPAN&gt;-fno-strict-aliasing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Turing off all optimizations can make code size explode and create other problems.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 12:24:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489494#M20605</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2022-07-14T12:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489521#M20608</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;About the optimization that I'm using, please refer to the file enclosed.&lt;/P&gt;&lt;P&gt;I tried to deselect the "Merge Identical constants" field without any result.&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;Kinds Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 13:30:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489521#M20608</guid>
      <dc:creator>chobin</dc:creator>
      <dc:date>2022-07-14T13:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso Compiler</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489552#M20611</link>
      <description>&lt;P&gt;The image shows that optimization is already turned off.&lt;BR /&gt;So the problem is not optimization.&lt;BR /&gt;Unless the project was not 'cleaned' when changing these settings.&lt;BR /&gt;Always force a full project clean when changing these.&lt;BR /&gt;&lt;BR /&gt;Try adding:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-fno-strict-aliasing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;I don't expect it to change anything if optimization is already off.&lt;BR /&gt;There is something else going on here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 14:20:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/MCUXpresso-Compiler/m-p/1489552#M20611</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2022-07-14T14:20:53Z</dc:date>
    </item>
  </channel>
</rss>

