<?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: variable allocated in paged RAM &amp; its unprecented behaviour in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456409#M11630</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are these variables used in more than one C file? If so, then in your header file you need to surround these variables with the same #pragma DATA_SEG 's. This is necessary to make compiler aware about required addressing mechanism. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using __RPAGE_SEG variables? These may need changing compiler's "Code Generation"-&amp;gt;"Assume object are in same page for"&amp;nbsp; setting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2015 12:50:18 GMT</pubDate>
    <dc:creator>kef2</dc:creator>
    <dc:date>2015-11-04T12:50:18Z</dc:date>
    <item>
      <title>variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456408#M11629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;Hi All,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;We are using&amp;nbsp; MC9S12XHY controller.&amp;nbsp; Controller permits 8K&amp;nbsp; non paged ram and 4k&amp;nbsp; paged ram. Since&amp;nbsp; ouyrram consumption is more than 8K,&amp;nbsp; we used paged ram.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;We referred the following documents for proper implementation&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;TN238.pdf TN240.PDF( From freescale)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;#pragma DATA_SEG __GPAGE_SEG PAGED_RAM&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;static unsigned int a=23;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;static unsigned int b=35;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;We verified from the .map file and variables are allocated in the Paged RAM&amp;nbsp; segment.&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;we also faced problem while copying values between two paged ram variables&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f; text-align: justify;"&gt;While using this variables in runtime, we observed unprecedented behavior in these RAM variables.&amp;nbsp; To sum it up, if we allocate these variables&amp;nbsp; in non paged ram, we didnt face any issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 08:43:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456408#M11629</guid>
      <dc:creator>rubykrishna</dc:creator>
      <dc:date>2015-11-04T08:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456409#M11630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are these variables used in more than one C file? If so, then in your header file you need to surround these variables with the same #pragma DATA_SEG 's. This is necessary to make compiler aware about required addressing mechanism. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using __RPAGE_SEG variables? These may need changing compiler's "Code Generation"-&amp;gt;"Assume object are in same page for"&amp;nbsp; setting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 12:50:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456409#M11630</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2015-11-04T12:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456410#M11631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Edward,&lt;/P&gt;&lt;P&gt;They are are static variables and they are not used&amp;nbsp; as extern more than one .c file.&lt;/P&gt;&lt;P&gt; but we pass&amp;nbsp; those variables by value or&amp;nbsp; reference(Address of the variables)&amp;nbsp; via functions to other.c files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are using __GPAGE_SEG as per guidelines TN238.PDF!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 13:17:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456410#M11631</guid>
      <dc:creator>rubykrishna</dc:creator>
      <dc:date>2015-11-04T13:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456411#M11632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then perhaps required far pointer qualifier is missing?&lt;/P&gt;&lt;P&gt;void foo(int * far aa);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paged variables are fine in CW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 13:48:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456411#M11632</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2015-11-04T13:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456412#M11633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ruby,&lt;/P&gt;&lt;P&gt;please be aware, there is compiler/linker optimization.&lt;/P&gt;&lt;P&gt;When two variables are located in the same banked non default segment, Compiler/Linker suppose that they are in the same page and remove paging operations.&lt;/P&gt;&lt;P&gt;You could disable this optimization.&lt;/P&gt;&lt;P&gt;Go to project settings (Alt+F7), Compiler for HC12, Code Generation, check “Assume object are in same page for” and change settings to “never for different ojects”. Or you could simply add “-PSegObj” into Compiler Command Line Arguments.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PSegObj.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51850i1FDABC01BE89065A/image-size/large?v=v2&amp;amp;px=999" role="button" title="PSegObj.png" alt="PSegObj.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&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>Wed, 04 Nov 2015 16:18:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456412#M11633</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-11-04T16:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456413#M11634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Radek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since Ruby is using __GPAGE_SEG and all RAM fits the same GPAGE segment, there's no need to worry about -PSegxxx switch, all settings must be fine. Ruby's issue must be somewhere else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Edward&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2015 17:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456413#M11634</guid>
      <dc:creator>kef2</dc:creator>
      <dc:date>2015-11-04T17:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: variable allocated in paged RAM &amp; its unprecented behaviour</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456414#M11635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Edward,&lt;/P&gt;&lt;P&gt;You are right, I missed that point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ruby,&lt;/P&gt;&lt;P&gt;Could you please share with us your code for operations with these variables (copy,..)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 09:42:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/variable-allocated-in-paged-RAM-its-unprecented-behaviour/m-p/456414#M11635</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-11-06T09:42:40Z</dc:date>
    </item>
  </channel>
</rss>

