<?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>ColdFire/68K Microcontrollers and Processors中的主题 Compiler problem ?!</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206297#M9803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;today while working on ColdFire microchip with Freescale Codewarrior 6.4 I encountered a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lets say one function is composed of other functions, and when I compile the code it seems like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that this other functions aren't included in the output file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This functions are used for separating bytes from an short or a long in and to merge 2 bytes into a short and 4 bytes into a long int. The sample code could be seen below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[code]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UINT16 convert_two_bytes_to_UINT16(UINT8 *bytes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; UINT16 result = bytes[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result &amp;lt;&amp;lt;= 8;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result |= bytes[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/code]&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use this function in the main function, in the neverending loop the function works and the return value corresponds to the value of 2 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know what do to, so if somebody had simmilar problems I cindly ask them for some help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BoSCHoW.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2008 23:08:15 GMT</pubDate>
    <dc:creator>BoSCHoW</dc:creator>
    <dc:date>2008-03-25T23:08:15Z</dc:date>
    <item>
      <title>Compiler problem ?!</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206297#M9803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;today while working on ColdFire microchip with Freescale Codewarrior 6.4 I encountered a problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lets say one function is composed of other functions, and when I compile the code it seems like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that this other functions aren't included in the output file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This functions are used for separating bytes from an short or a long in and to merge 2 bytes into a short and 4 bytes into a long int. The sample code could be seen below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[code]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UINT16 convert_two_bytes_to_UINT16(UINT8 *bytes)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; UINT16 result = bytes[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result &amp;lt;&amp;lt;= 8;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result |= bytes[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/code]&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use this function in the main function, in the neverending loop the function works and the return value corresponds to the value of 2 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know what do to, so if somebody had simmilar problems I cindly ask them for some help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BoSCHoW.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 23:08:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206297#M9803</guid>
      <dc:creator>BoSCHoW</dc:creator>
      <dc:date>2008-03-25T23:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler problem ?!</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206298#M9804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Is the problem that the compiler did inline this function?&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 00:30:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206298#M9804</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-03-26T00:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler problem ?!</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206299#M9805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;actually i dont know. If I want to check this where I have to look ?&lt;BR /&gt;Anyway what is the solution for this problem, if the compiler made an inline function ?&lt;BR /&gt;&lt;BR /&gt;thanks and&lt;BR /&gt;Best Regards,&lt;BR /&gt;BoSCHoW.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 01:29:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206299#M9805</guid>
      <dc:creator>BoSCHoW</dc:creator>
      <dc:date>2008-03-28T01:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler problem ?!</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206300#M9806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Why is it a problem if the compiler did just inline the code?&lt;BR /&gt;It appears to be a good candidate for inlining for me.&lt;BR /&gt;Anyway, check the project preference panels, I think the default setting for inlining is "smart", which means the compiler can pick the ones he want to inline.&lt;BR /&gt;&lt;BR /&gt;Does the code not behave properly? (Which would mean it is not just an inline issue)&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 07:35:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Compiler-problem/m-p/206300#M9806</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-03-28T07:35:33Z</dc:date>
    </item>
  </channel>
</rss>

