<?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 Development Tools中的主题 prm data available in C code?</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/prm-data-available-in-C-code/m-p/374953#M2091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;i have written a simple program in which i define a local variable in the main function and take the address of that variable similarly i take another variable in each function and calculate the address and do the difference of them.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;unsigned char *ptrone=NULL;&lt;/P&gt;&lt;P&gt;unsigned char *ptrtwo=NULL;&lt;/P&gt;&lt;P&gt;unsigned int stacksize=0;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; volatile unsigned char test1;&lt;/P&gt;&lt;P&gt;ptrone = &amp;amp;test1;&lt;/P&gt;&lt;P&gt;subfunction1();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void subfunction1(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;unsigned char test1=0;&lt;/P&gt;&lt;P&gt;ptrtwo = &amp;amp;test2;&lt;/P&gt;&lt;P&gt;stacksize = (ptrone - ptrtwo);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in somepart of the code i constantly check the stacksize and if it crosses the set value in the prm then it will reset the system.&lt;/P&gt;&lt;P&gt;First question: does the code work as expected? (according to me it works fine)&lt;/P&gt;&lt;P&gt;second: can i read the STACKSIZE parameter of the prm file into my C code?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jan 2015 18:17:40 GMT</pubDate>
    <dc:creator>rahulkrishna</dc:creator>
    <dc:date>2015-01-24T18:17:40Z</dc:date>
    <item>
      <title>prm data available in C code?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/prm-data-available-in-C-code/m-p/374953#M2091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;i have written a simple program in which i define a local variable in the main function and take the address of that variable similarly i take another variable in each function and calculate the address and do the difference of them.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;unsigned char *ptrone=NULL;&lt;/P&gt;&lt;P&gt;unsigned char *ptrtwo=NULL;&lt;/P&gt;&lt;P&gt;unsigned int stacksize=0;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt; volatile unsigned char test1;&lt;/P&gt;&lt;P&gt;ptrone = &amp;amp;test1;&lt;/P&gt;&lt;P&gt;subfunction1();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void subfunction1(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;unsigned char test1=0;&lt;/P&gt;&lt;P&gt;ptrtwo = &amp;amp;test2;&lt;/P&gt;&lt;P&gt;stacksize = (ptrone - ptrtwo);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in somepart of the code i constantly check the stacksize and if it crosses the set value in the prm then it will reset the system.&lt;/P&gt;&lt;P&gt;First question: does the code work as expected? (according to me it works fine)&lt;/P&gt;&lt;P&gt;second: can i read the STACKSIZE parameter of the prm file into my C code?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jan 2015 18:17:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/prm-data-available-in-C-code/m-p/374953#M2091</guid>
      <dc:creator>rahulkrishna</dc:creator>
      <dc:date>2015-01-24T18:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: prm data available in C code?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/prm-data-available-in-C-code/m-p/374954#M2092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rahul,&lt;/P&gt;&lt;P&gt;I think you can also find the answer in this thread&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/340654" title="https://community.freescale.com/thread/340654"&gt;https://community.freescale.com/thread/340654&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;correct?&lt;/P&gt;&lt;P&gt;&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>Mon, 02 Feb 2015 04:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/prm-data-available-in-C-code/m-p/374954#M2092</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2015-02-02T04:08:08Z</dc:date>
    </item>
  </channel>
</rss>

