<?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 Confusion between Data_seg and code_seg in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355434#M11286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen the following code and i have doubts &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the prm file is having the following statements&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test.prm&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&amp;nbsp; commands */&lt;/P&gt;&lt;P&gt;PARAMETERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; PAGE_E0&lt;/P&gt;&lt;P&gt;/*end of prm file */&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where the PARAMETERS is a sections having some constants and placed into the flash memory page_e0.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have seen the PARAMETERS in the test.c file as&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG __GPAGE_SEG&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/* PARAMETERS CONSTANTS */&lt;/P&gt;&lt;P&gt;#Pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my doubt is PARAMETERS is a constant and located in the flash memory. What is th meaning of declaring it as DATA_SEG? Am i correct in assuming that the statement is not required. (May be the idea is to copy the variables from flash to ram but the statement is not required).&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;P&gt;VIhaan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Jan 2015 10:01:18 GMT</pubDate>
    <dc:creator>vihaanred</dc:creator>
    <dc:date>2015-01-19T10:01:18Z</dc:date>
    <item>
      <title>Confusion between Data_seg and code_seg</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355434#M11286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen the following code and i have doubts &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the prm file is having the following statements&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test.prm&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&amp;nbsp; commands */&lt;/P&gt;&lt;P&gt;PARAMETERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; PAGE_E0&lt;/P&gt;&lt;P&gt;/*end of prm file */&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where the PARAMETERS is a sections having some constants and placed into the flash memory page_e0.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have seen the PARAMETERS in the test.c file as&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG __GPAGE_SEG&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/* PARAMETERS CONSTANTS */&lt;/P&gt;&lt;P&gt;#Pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my doubt is PARAMETERS is a constant and located in the flash memory. What is th meaning of declaring it as DATA_SEG? Am i correct in assuming that the statement is not required. (May be the idea is to copy the variables from flash to ram but the statement is not required).&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;P&gt;VIhaan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jan 2015 10:01:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355434#M11286</guid>
      <dc:creator>vihaanred</dc:creator>
      <dc:date>2015-01-19T10:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion between Data_seg and code_seg</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355435#M11287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vihaan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from my understanding, you define const data in PARAMETERS section which is paged Flash memory. Correct? &lt;/P&gt;&lt;P&gt; if it's true, we need to use key word CONST_SEG instead of DATA_SEG. for example:&lt;/P&gt;&lt;P&gt;#pragma CONST_SEG __GPAGE_SEG&amp;nbsp;&amp;nbsp;&amp;nbsp; PARAMETERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;/* PARAMETERS CONSTANTS */&lt;/P&gt;&lt;P&gt;#Pragma CONST_SEG DEFAULT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can this help you to solve the problem?&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>Tue, 20 Jan 2015 05:53:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355435#M11287</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2015-01-20T05:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion between Data_seg and code_seg</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355436#M11288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes it is correct i think it is a mistake to keep DATA_SEG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jan 2015 05:56:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Confusion-between-Data-seg-and-code-seg/m-p/355436#M11288</guid>
      <dc:creator>vihaanred</dc:creator>
      <dc:date>2015-01-20T05:56:36Z</dc:date>
    </item>
  </channel>
</rss>

