<?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 Use of Paged Memory in code - S12 to S12X in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197604#M7913</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I m porting my existing code from S12 to S12X and stuck up with RAM problem as default RAM is 12 KB instead of 14 KB&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;While using different segments in code while defining different varibles what is the process that should be follwed?&lt;/DIV&gt;&lt;DIV&gt;Likewise if I m declaring 5 variables and of type int and i want it in RAM page .&lt;/DIV&gt;&lt;DIV&gt;I ll make the changes in prm file and the in variable.c file what should be the format?????&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="text-decoration: underline;"&gt;Only at the start of variables like&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;#pragma DAT_SEG __RPAGE SEG XXXX&lt;/DIV&gt;&lt;DIV&gt;int a;&lt;/DIV&gt;&lt;DIV&gt;int b;&lt;/DIV&gt;&lt;DIV&gt;int c;&lt;/DIV&gt;&lt;DIV&gt;int d;&lt;/DIV&gt;&lt;DIV&gt;int e;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;or &lt;SPAN style="text-decoration: underline;"&gt;at the start and end of the variables so that the variables after it can be assigned to some other block&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;#pragma DAT_SEG __RPAGE SEG XXXX&lt;/DIV&gt;&lt;DIV&gt;int a;&lt;/DIV&gt;&lt;DIV&gt;int b;&lt;/DIV&gt;&lt;DIV&gt;int c;&lt;/DIV&gt;&lt;DIV&gt;int d;&lt;/DIV&gt;&lt;DIV&gt;int e;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#pragma DAT_SEG __RPAGE SEG XXXX&lt;/DIV&gt;&lt;DIV&gt;and if this is the right way of doing then both the starting and ending #pragma should be same or different or any one of them has to be default??????&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-02-29&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;09:19 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2008 19:58:24 GMT</pubDate>
    <dc:creator>kp2309</dc:creator>
    <dc:date>2008-02-28T19:58:24Z</dc:date>
    <item>
      <title>Use of Paged Memory in code - S12 to S12X</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197604#M7913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I m porting my existing code from S12 to S12X and stuck up with RAM problem as default RAM is 12 KB instead of 14 KB&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;While using different segments in code while defining different varibles what is the process that should be follwed?&lt;/DIV&gt;&lt;DIV&gt;Likewise if I m declaring 5 variables and of type int and i want it in RAM page .&lt;/DIV&gt;&lt;DIV&gt;I ll make the changes in prm file and the in variable.c file what should be the format?????&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="text-decoration: underline;"&gt;Only at the start of variables like&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;#pragma DAT_SEG __RPAGE SEG XXXX&lt;/DIV&gt;&lt;DIV&gt;int a;&lt;/DIV&gt;&lt;DIV&gt;int b;&lt;/DIV&gt;&lt;DIV&gt;int c;&lt;/DIV&gt;&lt;DIV&gt;int d;&lt;/DIV&gt;&lt;DIV&gt;int e;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;or &lt;SPAN style="text-decoration: underline;"&gt;at the start and end of the variables so that the variables after it can be assigned to some other block&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;#pragma DAT_SEG __RPAGE SEG XXXX&lt;/DIV&gt;&lt;DIV&gt;int a;&lt;/DIV&gt;&lt;DIV&gt;int b;&lt;/DIV&gt;&lt;DIV&gt;int c;&lt;/DIV&gt;&lt;DIV&gt;int d;&lt;/DIV&gt;&lt;DIV&gt;int e;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;#pragma DAT_SEG __RPAGE SEG XXXX&lt;/DIV&gt;&lt;DIV&gt;and if this is the right way of doing then both the starting and ending #pragma should be same or different or any one of them has to be default??????&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Added p/n to subject.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by NLFSJ on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-02-29&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;09:19 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 19:58:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197604#M7913</guid>
      <dc:creator>kp2309</dc:creator>
      <dc:date>2008-02-28T19:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Paged Memory in code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197605#M7914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The pragma DATA_SEG remains active until another pragma DATA_SEG defines another current section.&lt;BR /&gt;Therefore the second identical pragma does not do anything. Usually there is at the end also a&lt;BR /&gt;#pragma DATA_SEG DEFAULT, but that's for the variables defined elsewhere, so those get into the default section again.&lt;BR /&gt;Alternatively to the DEFAULT one, you can also put a #pragma push/#pragma pop around the&lt;BR /&gt;complete block, that has the advantage to restore the current section instead of just reseting it to DEFAULT.&lt;BR /&gt;That especially helps when you start using the XGATE, as the XGATE is using non DEFAULT sections for its code and data.&lt;BR /&gt;Please also have a look at the technical notes, there are at least 2 for the topic how to use the paging with the S12X.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;// example.h#pragma push#pragma DATA_SEG __RPAGE_SEG MY_RPAGE0_SECextern int i_rpage0;extern long i1_rpage0;#pragma pop// example.c#include "example.h"#pragma push#pragma DATA_SEG __RPAGE_SEG MY_RPAGE0_SECint i_rpage0;long i1_rpage0;#pragma DATA_SEG __RPAGE_SEG MY_RPAGE1_SECstatic char buf_rpage1[1000];#pragma popstatic char i_default;&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 22:02:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197605#M7914</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-02-28T22:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use of Paged Memory in code</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197606#M7915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the reply&lt;/DIV&gt;&lt;DIV&gt;I have done push and pop as told by you and assigned particular sectors in prm file but the code is not running ,As soon as burn the code and try to run it from debugger it doesnt go into running mode.&lt;/DIV&gt;&lt;DIV&gt;Can it be because of improper use of pages ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;also I am not able to find out technical notes, where can i get it exactly????&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Feb 2008 13:08:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Use-of-Paged-Memory-in-code-S12-to-S12X/m-p/197606#M7915</guid>
      <dc:creator>kp2309</dc:creator>
      <dc:date>2008-02-29T13:08:34Z</dc:date>
    </item>
  </channel>
</rss>

