<?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 IDEのトピックHow to make sure inline functions are really &amp;quot;inlined&amp;quot; in MCUX IDE on RT1170?</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240731#M6765</link>
    <description>&lt;P&gt;When I'm using MCUX IDE for RT1170 develop, I found most inline functions are actually not inlined, but invoked as a normal function. What went wrong? I can't find anywhere to configure such behavior in the compiler settings.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Such as "MC_PWM_UPDATE" function, it should be inlined, but it's treated as a NOT inline function:&lt;/P&gt;
&lt;P&gt;static inline void MC_PWM_UPDATE(GMCLIB_3COOR_T_F16 *psDuty)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached project.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sutter_zhou_0-1614923859401.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138848i7F2B8B65C2F2B9A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sutter_zhou_0-1614923859401.png" alt="sutter_zhou_0-1614923859401.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 05:59:15 GMT</pubDate>
    <dc:creator>sutter_zhou</dc:creator>
    <dc:date>2021-03-05T05:59:15Z</dc:date>
    <item>
      <title>How to make sure inline functions are really "inlined" in MCUX IDE on RT1170?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240731#M6765</link>
      <description>&lt;P&gt;When I'm using MCUX IDE for RT1170 develop, I found most inline functions are actually not inlined, but invoked as a normal function. What went wrong? I can't find anywhere to configure such behavior in the compiler settings.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Such as "MC_PWM_UPDATE" function, it should be inlined, but it's treated as a NOT inline function:&lt;/P&gt;
&lt;P&gt;static inline void MC_PWM_UPDATE(GMCLIB_3COOR_T_F16 *psDuty)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached project.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sutter_zhou_0-1614923859401.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138848i7F2B8B65C2F2B9A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sutter_zhou_0-1614923859401.png" alt="sutter_zhou_0-1614923859401.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 05:59:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240731#M6765</guid>
      <dc:creator>sutter_zhou</dc:creator>
      <dc:date>2021-03-05T05:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to make sure inline functions are really "inlined" in MCUX IDE on RT1170?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240774#M6767</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/4935"&gt;@sutter_zhou&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;'inline' is just a hint for the compiler: if it is getting inline or not is depending on the compiler decision.&lt;/P&gt;&lt;P&gt;If you really want to have things inlined, you need to use a macro for the code.&lt;/P&gt;&lt;P&gt;Checking the map file if a symbol/function is there does not tell you if it is inlined or not: you need to check the actual calls, because if you take the address of an inlined function there will be both inlined and non-inlined versions.&lt;/P&gt;&lt;P&gt;And check your compiler/optimization settings: if you optimize for code size, the compiler likely will not inline as this in general increases the code size. If not already set: optimize for speed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:02:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240774#M6767</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2021-03-05T07:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to make sure inline functions are really "inlined" in MCUX IDE on RT1170?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240815#M6768</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/17173"&gt;@ErichStyger&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;This project has no optimization at all. So I think it should stick to C grammar. I can confirm that inline functions are invoked in the runtime. Do you know any macro or keywords that can make sure functions can be inlined in GCC? Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:54:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240815#M6768</guid>
      <dc:creator>sutter_zhou</dc:creator>
      <dc:date>2021-03-05T07:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to make sure inline functions are really "inlined" in MCUX IDE on RT1170?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240829#M6769</link>
      <description>&lt;P&gt;See this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/8381293/how-do-i-force-gcc-to-inline-a-function" target="_blank"&gt;https://stackoverflow.com/questions/8381293/how-do-i-force-gcc-to-inline-a-function&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 08:14:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240829#M6769</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2021-03-05T08:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to make sure inline functions are really "inlined" in MCUX IDE on RT1170?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240844#M6770</link>
      <description>&lt;P&gt;Thanks, it helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 08:36:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-make-sure-inline-functions-are-really-quot-inlined-quot/m-p/1240844#M6770</guid>
      <dc:creator>sutter_zhou</dc:creator>
      <dc:date>2021-03-05T08:36:34Z</dc:date>
    </item>
  </channel>
</rss>

