<?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>CodeWarrior for MCUのトピックHC12: Codewarrior do not execute the Function</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128476#M741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi friends !&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am trying to make the function below. It is not functioning. The compiler Codewarrior 3,1 accuses error and appears the following message :&lt;/DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _FUFLOAT in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _FDIV_RC in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _MUL in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _FSTRUNC in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="text-decoration: underline;"&gt;This are the codes:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; while (1)&amp;nbsp;&amp;nbsp;//&amp;nbsp;always&lt;BR /&gt;&amp;nbsp;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;unsigned int res1,res2,res3;&lt;BR /&gt;&amp;nbsp; res1=10;&lt;BR /&gt;&amp;nbsp; res2=100;&lt;BR /&gt;&amp;nbsp; res3=prod(&amp;amp;res1,&amp;amp;res2);// &lt;SPAN style="color: #FF0066;"&gt;Here i call the function&lt;/SPAN&gt;&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;unsigned int prod (unsigned int *a,unsigned int *b) // &lt;SPAN style="color: #FF0066;"&gt;This is the Function&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;{&lt;BR /&gt;unsigned int tempa;&lt;BR /&gt;unsigned int tempb;&lt;BR /&gt;unsigned int tempc;&lt;BR /&gt;signed int t;&lt;BR /&gt;float x;&lt;BR /&gt;tempa=*a; &lt;SPAN style="color: #FF0033;"&gt;//tempa is a number between&amp;nbsp;1 to 100&lt;BR /&gt;&lt;/SPAN&gt;tempb=*b; &lt;SPAN style="color: #FF3366;"&gt;//tempb is a number between&amp;nbsp;1 to 100&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;x=(tempa/100.0)*tempb;&lt;BR /&gt;t=(signed int)x;&lt;BR /&gt;tempc=(unsigned int)t;&lt;/DIV&gt;&lt;DIV&gt;return(tempc);&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what's wrong? Already it makes many days that I am trying and i don't know what to do to function.&amp;nbsp; Please,&amp;nbsp; help me! Thanks , JR&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-04-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:30 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Aug 2006 06:07:30 GMT</pubDate>
    <dc:creator>JR</dc:creator>
    <dc:date>2006-08-28T06:07:30Z</dc:date>
    <item>
      <title>HC12: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128476#M741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi friends !&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am trying to make the function below. It is not functioning. The compiler Codewarrior 3,1 accuses error and appears the following message :&lt;/DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _FUFLOAT in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _FDIV_RC in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _MUL in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;Link error ; L1822&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif"&gt;&lt;IMG alt=":smileyfrustrated:" class="emoticon emoticon-smileyfrustrated" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-frustrated.gif" title="Smiley Frustrated" /&gt;&lt;/A&gt;ymbol _FSTRUNC in file c:\....main.c.o is undefined.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="text-decoration: underline;"&gt;This are the codes:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; while (1)&amp;nbsp;&amp;nbsp;//&amp;nbsp;always&lt;BR /&gt;&amp;nbsp;{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;unsigned int res1,res2,res3;&lt;BR /&gt;&amp;nbsp; res1=10;&lt;BR /&gt;&amp;nbsp; res2=100;&lt;BR /&gt;&amp;nbsp; res3=prod(&amp;amp;res1,&amp;amp;res2);// &lt;SPAN style="color: #FF0066;"&gt;Here i call the function&lt;/SPAN&gt;&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;unsigned int prod (unsigned int *a,unsigned int *b) // &lt;SPAN style="color: #FF0066;"&gt;This is the Function&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;{&lt;BR /&gt;unsigned int tempa;&lt;BR /&gt;unsigned int tempb;&lt;BR /&gt;unsigned int tempc;&lt;BR /&gt;signed int t;&lt;BR /&gt;float x;&lt;BR /&gt;tempa=*a; &lt;SPAN style="color: #FF0033;"&gt;//tempa is a number between&amp;nbsp;1 to 100&lt;BR /&gt;&lt;/SPAN&gt;tempb=*b; &lt;SPAN style="color: #FF3366;"&gt;//tempb is a number between&amp;nbsp;1 to 100&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;x=(tempa/100.0)*tempb;&lt;BR /&gt;t=(signed int)x;&lt;BR /&gt;tempc=(unsigned int)t;&lt;/DIV&gt;&lt;DIV&gt;return(tempc);&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what's wrong? Already it makes many days that I am trying and i don't know what to do to function.&amp;nbsp; Please,&amp;nbsp; help me! Thanks , JR&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-04-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:30 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 06:07:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128476#M741</guid>
      <dc:creator>JR</dc:creator>
      <dc:date>2006-08-28T06:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128477#M742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seemed float type is used in you project, but you did not select "float type support"&amp;nbsp;when you create your project.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just re-create a new project and select "float support", and rebuild it.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 08:44:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128477#M742</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2006-08-28T08:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128478#M743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello JR,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yes, the use of the &lt;FONT face="Courier New"&gt;float&lt;/FONT&gt; is the current problem.&amp;nbsp; However, since you commence with &lt;FONT face="Courier New"&gt;int&lt;/FONT&gt; data, and return an &lt;FONT face="Courier New"&gt;int&lt;/FONT&gt;, it should be possible to avoid using &lt;FONT face="Courier New"&gt;float&lt;/FONT&gt; within your function.&amp;nbsp; This will greatly improve the efficiency of your code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The following calculation should maintain &lt;FONT face="Courier New"&gt;unsigned int&lt;/FONT&gt; precision, with a calculated value between 0 and 100&lt;/FONT&gt;.&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;tempc = tempa * tempb / 100;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Arial"&gt;Alternatively, i would think you could simply write the contents of the function as -&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt; &lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;unsigned int prod (unsigned int *a,unsigned int *b)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;return ((*a) * (*b) / 100);&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Arial"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Arial"&gt;Regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 11:41:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128478#M743</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-08-28T11:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128479#M744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;No need to create a new project.&lt;BR /&gt;&lt;BR /&gt;Assuming you are using HCS12 with banked memory model:&lt;BR /&gt;&lt;BR /&gt;- Take a backup copy of your project (just in case...)&lt;BR /&gt;- Remove ansibi.lib from your project.&lt;BR /&gt;- Add ansibf.lib to your project.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 17:29:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128479#M744</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2006-08-28T17:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128480#M745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Markie !&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;You are right ! Thank you ! JR&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 00:54:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128480#M745</guid>
      <dc:creator>JR</dc:creator>
      <dc:date>2006-09-01T00:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128481#M746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi friend !&lt;/DIV&gt;&lt;DIV&gt;Your explanation helped to solve&amp;nbsp; the problem, thank you !&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2006 00:58:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128481#M746</guid>
      <dc:creator>JR</dc:creator>
      <dc:date>2006-09-01T00:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior do not execute the Function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128482#M747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy,&lt;/P&gt;&lt;P&gt;Sorry to re-open this topic, I'm a total newbie in µC, and I got this error too, how can I do what you say??&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Pilou007&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2012 16:03:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/HC12-Codewarrior-do-not-execute-the-Function/m-p/128482#M747</guid>
      <dc:creator>pilou007</dc:creator>
      <dc:date>2012-06-08T16:03:51Z</dc:date>
    </item>
  </channel>
</rss>

