<?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 Function parameters allocated at same address in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416230#M11666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with one function and function parameters. I am using:&lt;/P&gt;&lt;P&gt;- CodeWarrior for MCU&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version: 10.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Build Id:140329&lt;/P&gt;&lt;P&gt;with Hearst Board with S12ZVC on it.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function like this:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void detrend(uint16 *nfft, sint32 newelement, sint16 *timedata, sint32 average)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problematic are nfft and timedata. To nfft I pass the address of single variable, to timedata I pass the beginning of an array.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nfft itself is always allocated in the address range of an array pointed by timedata.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same thing occurs when I use regular function local variable instead of pointer for nfft, only then this local variable is allocated in the address range of the array pointed by timedata.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2015 08:30:35 GMT</pubDate>
    <dc:creator>dordestojicevic</dc:creator>
    <dc:date>2015-08-06T08:30:35Z</dc:date>
    <item>
      <title>Function parameters allocated at same address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416230#M11666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem with one function and function parameters. I am using:&lt;/P&gt;&lt;P&gt;- CodeWarrior for MCU&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version: 10.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Build Id:140329&lt;/P&gt;&lt;P&gt;with Hearst Board with S12ZVC on it.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a function like this:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void detrend(uint16 *nfft, sint32 newelement, sint16 *timedata, sint32 average)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problematic are nfft and timedata. To nfft I pass the address of single variable, to timedata I pass the beginning of an array.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nfft itself is always allocated in the address range of an array pointed by timedata.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same thing occurs when I use regular function local variable instead of pointer for nfft, only then this local variable is allocated in the address range of the array pointed by timedata.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 08:30:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416230#M11666</guid>
      <dc:creator>dordestojicevic</dc:creator>
      <dc:date>2015-08-06T08:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Function parameters allocated at same address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416231#M11667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Dorde,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To investigate your problem correctly and efficiently, please provide us the follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. demo project&lt;/P&gt;&lt;P&gt;2. how to reproduce your problem step by step with your demo project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your cooperation!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Zhang Jun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 07:10:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416231#M11667</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2015-08-07T07:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Function parameters allocated at same address</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416232#M11668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meanwhile I figured it out. I was overflowing the memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to find this out is to declare those global. Then during compiling you would get an error. If those are local, it would just overwrite not really noticing you about anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be a nice feature to have a warning for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 07:26:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Function-parameters-allocated-at-same-address/m-p/416232#M11668</guid>
      <dc:creator>dordestojicevic</dc:creator>
      <dc:date>2015-08-07T07:26:32Z</dc:date>
    </item>
  </channel>
</rss>

