<?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>topic Re: Crazy arguments receiving in functions: help! in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184431#M4375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but your inserted pictures seem to be only 2x1 pixel in size, and don't contain any readable information to me. Can you cut an paste the real pictures after verifying they are correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2009 18:25:37 GMT</pubDate>
    <dc:creator>jbezem</dc:creator>
    <dc:date>2009-05-25T18:25:37Z</dc:date>
    <item>
      <title>Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184430#M4374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I use MC9S08LL16 with this version of Codewarrior:&lt;/P&gt;&lt;P&gt;ColdFireV1 build 080723&lt;BR /&gt;HCS08LL16 Service Pack 080813&lt;BR /&gt;HCS08SE8 Service Pack 080829&lt;BR /&gt;Release 8127&lt;BR /&gt;PE V.3.04 Service Pack 081024&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have declared in funcs.h this function:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;unsigned char GestioneMani(unsigned char ,unsigned char );&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In funcs.c I have write my function:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;unsigned char GestioneMani(unsigned char TempPassata,unsigned char UmidPassata)&lt;BR /&gt;{&amp;nbsp;&lt;BR /&gt;if( (TempPassata&amp;lt;26) &amp;amp;&amp;amp; (UmidPassata&amp;lt;80))&lt;BR /&gt;&amp;nbsp; return VERDE;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.......&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem:&amp;nbsp;&lt;/P&gt;&lt;P&gt;the arguments receiving are differents???!!!&lt;/P&gt;&lt;P&gt;This is a call:&lt;/P&gt;&lt;P&gt;&lt;A href="http://digilander.libero.it/ciccio.unico/image/1.jpg"&gt;&lt;IMG alt="CALL" border="0" height="706" src="http://digilander.libero.it/ciccio.unico/image/1.jpg" width="609" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is inside the function:&lt;A href="http://digilander.libero.it/ciccio.unico/image/2.jpg"&gt;&lt;IMG alt="inside" border="0" height="719" src="http://digilander.libero.it/ciccio.unico/image/2.jpg" width="648" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 15:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184430#M4374</guid>
      <dc:creator>Ciccio_unico</dc:creator>
      <dc:date>2009-05-25T15:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184431#M4375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, but your inserted pictures seem to be only 2x1 pixel in size, and don't contain any readable information to me. Can you cut an paste the real pictures after verifying they are correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 18:25:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184431#M4375</guid>
      <dc:creator>jbezem</dc:creator>
      <dc:date>2009-05-25T18:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184432#M4376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;this is the call:&lt;/P&gt;&lt;P&gt;&lt;A href="http://digilander.libero.it/ciccio.unico/image/1.jpg" target="test_blank"&gt;http://digilander.libero.it/ciccio.unico/image/1.jpg&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and this is inside the function:&lt;/P&gt;&lt;P&gt;&lt;A href="http://digilander.libero.it/ciccio.unico/image/2.jpg" target="test_blank"&gt;http://digilander.libero.it/ciccio.unico/image/2.jpg&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 22:04:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184432#M4376</guid>
      <dc:creator>Ciccio_unico</dc:creator>
      <dc:date>2009-05-25T22:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184433#M4377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- Is this a debug information issue (say the debugger shows the wrong values, but the code otherwise behaves properly)?&lt;/P&gt;&lt;P&gt;- Implicit parameter declaration, are there any compiler warnings (possibly disabled...)?&lt;/P&gt;&lt;P&gt;- Could also be a stack overflow, try to increase the STACKSIZE in the prm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 23:14:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184433#M4377</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-05-25T23:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184434#M4378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thanks!&lt;/P&gt;&lt;P&gt;Sorry for stupid question but where I can see my stack size?&lt;/P&gt;&lt;P&gt;I have seen the setting size in PRN file:&lt;/P&gt;&lt;P&gt;STACKSIZE 0x50&lt;/P&gt;&lt;P&gt;I have seen in MAP file where the compiler insert my stack:&lt;/P&gt;&lt;P&gt;.stack&amp;nbsp; 80&amp;nbsp;&amp;nbsp; R/W&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x167&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1B6&amp;nbsp;&amp;nbsp; RAM&lt;/P&gt;&lt;P&gt;Now I can see in debug mode how much stack I use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 15:10:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184434#M4378</guid>
      <dc:creator>Ciccio_unico</dc:creator>
      <dc:date>2009-05-26T15:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184435#M4379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;During debug, after you have entered the function and the function parameters are on the stack, ascertain the current address of the stack pointer. If this is less than the lowest allocated address for the stack (0x0167 from the map file), it is possible that you have overwritten some of the global or static variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Even if the pointer is slightly above the lowest address, this could still be problematic should an interrupt occur whilst within the function.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the variable &lt;EM&gt;Temperatura&lt;/EM&gt; is global, it may even be possible that this becomes overwritten by the stack during execution of a completely different part of the program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does your program use any float variables?&amp;nbsp; If so, this will greatly increase the stack size requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by bigmac on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-05-27&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;03:35 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 12:13:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184435#M4379</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-05-27T12:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184436#M4380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for your help!&lt;BR /&gt;No, the stack is not in overflow!&lt;BR /&gt;I dont used floating.&lt;BR /&gt;Temperatura is global.&lt;BR /&gt;I have resolve in this mode:&lt;BR /&gt;unsigned char GestioneMani(unsigned char ,unsigned char );&lt;BR /&gt;and call with GestioneMani(Temperatura,Umidita);&lt;BR /&gt;transformed in:&lt;BR /&gt;unsigned char GestioneMani(void);&lt;BR /&gt;and call in&amp;nbsp; GestioneMani();&lt;BR /&gt;I dont like this and I don't understand why, as soon as possible I deepens this problem.&lt;BR /&gt;I see the same problem when I forgot the include file.h but here there is it!&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 19:49:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184436#M4380</guid>
      <dc:creator>Ciccio_unico</dc:creator>
      <dc:date>2009-05-27T19:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Crazy arguments receiving in functions: help!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184437#M4381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I have resolved setting in Standard Settings--&amp;gt;Compiler--&amp;gt;Options--&amp;gt;Disable Optimization (-O0)&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 22:37:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Crazy-arguments-receiving-in-functions-help/m-p/184437#M4381</guid>
      <dc:creator>Ciccio_unico</dc:creator>
      <dc:date>2009-06-04T22:37:32Z</dc:date>
    </item>
  </channel>
</rss>

