<?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中的主题 Re: how to use the sin function</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127080#M467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;
&amp;gt;y[i]=double (sin (double i));
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I guess this should just be&lt;BR /&gt;&lt;PRE&gt;
y[i]=sin(i);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Why those extra double's?&lt;BR /&gt;&lt;BR /&gt;About printf, is your problem a link time error of not finding TERMIO_PutChar?&lt;BR /&gt;If so, search this forum for TERMIO_PutChar.&lt;BR /&gt;To use printf with doubles, also make sure your STACKSIZE in the prm is big enough.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2007 20:47:10 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-03-20T20:47:10Z</dc:date>
    <item>
      <title>how to use the sin function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127079#M466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i want to use the sine and cosine functions for my project implementaion. as i am new to codewarrior can any one help me in using the sin functions and printf statements i am working on m68hc12dp256 evaluation board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i tried the following code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# include&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void main(void){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int i=1; double y[10];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for(i=1;i10;i++){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;y[i]=double (sin (double i));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if i try to compile it, giving errors saying error: c2450 expected .* + - etc., (expected 'double*' instead of 'double'); what it is meaning&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;secondly&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i am not able to implement the printf statement?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanking you in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;quick response is required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Subbaraju P.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 14:40:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127079#M466</guid>
      <dc:creator>subbaraju</dc:creator>
      <dc:date>2007-03-20T14:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to use the sin function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127080#M467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;
&amp;gt;y[i]=double (sin (double i));
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I guess this should just be&lt;BR /&gt;&lt;PRE&gt;
y[i]=sin(i);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Why those extra double's?&lt;BR /&gt;&lt;BR /&gt;About printf, is your problem a link time error of not finding TERMIO_PutChar?&lt;BR /&gt;If so, search this forum for TERMIO_PutChar.&lt;BR /&gt;To use printf with doubles, also make sure your STACKSIZE in the prm is big enough.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 20:47:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127080#M467</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-03-20T20:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to use the sin function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127081#M468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;It's not clear from your code, but do you include math.h to define the sin/cos functions? Also, make sure that you're linking the correct library that contains both the trigonometric functions and the printf code. Check the readme.txt files that accompany the libraries in the lib directory for more information on what functions each library file contains.&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2007 21:02:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127081#M468</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2007-03-20T21:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to use the sin function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127082#M469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;J2MEJediMaster wrote:&lt;BR /&gt;It's not clear from your code, but do you include math.h to define the sin/cos functions? Also, make sure that you're linking the correct library that contains both the trigonometric functions and the printf code. Check the readme.txt files that accompany the libraries in the lib directory for more information on what functions each library file contains.&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Thanks for your help now i am able to work with sine function. but i am facing the problem of memory. for the same program if i increase the array size of y to 20 then in debugging it is indicated that no memory FFe:2 at the bottom and the debugging is not proceding. please suggest a possible solution to the problem.&lt;BR /&gt;thanking you.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 15:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127082#M469</guid>
      <dc:creator>subbaraju</dc:creator>
      <dc:date>2007-03-21T15:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to use the sin function</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127083#M470</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;According to the code snippet you sent over, y is a local variable. is that right?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The table will take a lot of space on the stack, which might overflow.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you try to either define a bigger stack in the .prm file or define the table as a global variable.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is that working better?&lt;/DIV&gt;&lt;DIV&gt;.&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 18:11:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-use-the-sin-function/m-p/127083#M470</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-03-21T18:11:03Z</dc:date>
    </item>
  </channel>
</rss>

