<?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: How to use huge ram on S12XEQ512 in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193552#M7044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;#pragma DATA_SEG __GPAGE_SEG &lt;FONT color="#ff0000"&gt;PAGED_RAM&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggested to define new placement&amp;nbsp;PAGED_&lt;STRONG&gt;G&lt;/STRONG&gt;_RAM. PAGED_RAM in original PRM file consists of a set of 4k RPAGE pages. You need to define one contiguous 'G segment and use it instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached PRM file. It is project wizard created PRM for XEQ512, modified for your needs. 6*4k pages are commented out. Remaining 424 bytes are cut from nonbanked RAM. You only need to replace PAGED_RAM in your code with G_RAM_25k.&lt;/P&gt;&lt;P&gt;I just tried this PRM&amp;nbsp;with your code No problems, it works and verify doesn't break until last i is tested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Sep 2012 16:06:35 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2012-09-03T16:06:35Z</dc:date>
    <item>
      <title>How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193549#M7041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to use byte array of 25Kbyte. I know that XEQ512 have 32KByte RAM.&lt;/P&gt;&lt;P&gt;But no matter what, I can not make byte array of about 4KB and over.&lt;/P&gt;&lt;P&gt;I think probably because it would be the prm file setting.&lt;/P&gt;&lt;P&gt;I confuse that how to change which file to get a sufficient amount of RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone help me please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CW for HC12 4.6 HCS12X EP100 Service Pack&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CW for HCS12(X) Microcontroller v4.6 build 6345&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 14:38:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193549#M7041</guid>
      <dc:creator>j_y_</dc:creator>
      <dc:date>2012-08-31T14:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193550#M7042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to edit PRM file, disable some RAM segments, create one big contiguous global RAM segment that can hold your big array. Check following thread, also use forums serach&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/110408#110408" title="https://community.freescale.com/message/110408#110408"&gt;https://community.freescale.com/message/110408#110408&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 15:20:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193550#M7042</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-08-31T15:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193551#M7043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I refered that linked page. and it has been a big help to solve the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;by the way, i got an other problem. it is a memory corruption.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG __GPAGE_SEG PAGED_RAM&lt;BR /&gt;unsigned char large_buff_25k[25000]={0,};&lt;BR /&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* memory writing */&lt;/P&gt;&lt;P&gt;unsigned int i=0;&lt;/P&gt;&lt;P&gt;for(i=0; i&amp;lt;25000; i++) large_buff_25k[i] = (i&amp;amp;0xff);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* verification */&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for(i=0; i&amp;lt;25000; i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; if((i%0x100) != large_buff_25k[i]) break; // &amp;lt;------ problem occur here&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;point of memory corruption is roughly close to 4K bytes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 15:36:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193551#M7043</guid>
      <dc:creator>j_y_</dc:creator>
      <dc:date>2012-09-03T15:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193552#M7044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;#pragma DATA_SEG __GPAGE_SEG &lt;FONT color="#ff0000"&gt;PAGED_RAM&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggested to define new placement&amp;nbsp;PAGED_&lt;STRONG&gt;G&lt;/STRONG&gt;_RAM. PAGED_RAM in original PRM file consists of a set of 4k RPAGE pages. You need to define one contiguous 'G segment and use it instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached PRM file. It is project wizard created PRM for XEQ512, modified for your needs. 6*4k pages are commented out. Remaining 424 bytes are cut from nonbanked RAM. You only need to replace PAGED_RAM in your code with G_RAM_25k.&lt;/P&gt;&lt;P&gt;I just tried this PRM&amp;nbsp;with your code No problems, it works and verify doesn't break until last i is tested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 16:06:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193552#M7044</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-09-03T16:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193553#M7045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reply and concern.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i used prm file you suggest. but that file occur below link error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error : L1004: Segment start Address expected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I removed the "DATA_NEAR" and "DATA_FAR" word.&lt;/P&gt;&lt;P&gt;And CW occur another link error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link Error : L1102: Out of allocation space in segment RAM_G_25k at address 0xF8000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can ask your IDE version if you don't mind.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2012 08:56:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193553#M7045</guid>
      <dc:creator>j_y_</dc:creator>
      <dc:date>2012-09-04T08:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193554#M7046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Probably CW4.6 doesn't like global addresses in PRM file or something. You may try CW5.1 with special edition licence.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2012 14:04:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193554#M7046</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-09-04T14:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use huge ram on S12XEQ512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193555#M7047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i appriate you at all. thanks for advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i was install CW 5.1 as your advice. but, it was still.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, i dig and dig and dig. as infinite loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then i found a cause of memory corruption.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is cross-file-using(???) like below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i was define variables&amp;nbsp;at main.c. and it refered by another file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;-- main.c --#define LARGE_BUFF_LEN 25000#pragma DATA_SEG __GPAGE_SEG GRAM_25Kunsigned char large_buff[LARGE_BUFF_LEN];#pragma DATA_SEG DEFAULT-- other.c --#define LARGE_BUFF_LEN 25000      // never mind this :smileyhappy:#pragma DATA_SEG __GPAGE_SEG GRAM_25Kextern unsigned char large_buff[LARGE_BUFF_LEN];#pragma DATA_SEG DEFAULT&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it was a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, i fix as below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;-- main.c --CopyToLargeBuff(..., ...);-- other.c --#define LARGE_BUFF_LEN 25000#pragma DATA_SEG __GPAGE_SEG GRAM_25Kunsigned char large_buff[LARGE_BUFF_LEN];#pragma DATA_SEG DEFAULTunsigned int CopyToLargeBuff(unsigned char* buf, unsigned int size){  unsigned int cnt=0;  static unsigned int insertion_pos = 0;    if(size == 0) return 0;    do {    insertion_pos %= LARGE_BUFF_LEN;    large_buff[insertion_pos] = buf[cnt];    cnt++;    insertion_pos++;  } while(size != cnt);    return cnt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i don't know why. but i did fix it. and i can go home.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you again, kef. have a good day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:47:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-use-huge-ram-on-S12XEQ512/m-p/193555#M7047</guid>
      <dc:creator>j_y_</dc:creator>
      <dc:date>2020-10-29T09:47:32Z</dc:date>
    </item>
  </channel>
</rss>

