<?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 for MCUのトピックFar pointer problem</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160042#M4355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a simple ROM CRC routine, but for some reason I'm only able to access up to 16 bit memory addresses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unsigned long* _far&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;temp_address;&lt;/P&gt;&lt;P&gt;unsigned long&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;temp_address = (unsigned long* _far) 0x088000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;value = *(temp_address);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;temp_address is correctly set, however when I attempt to read the value at that address, I'm getting the value from address 0x8000.&amp;nbsp;&amp;nbsp; Any suggestions are appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MC9S12P128&lt;/P&gt;&lt;P&gt;CodeWarrior Version 5.9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Nov 2010 16:16:41 GMT</pubDate>
    <dc:creator>foo222</dc:creator>
    <dc:date>2010-11-03T16:16:41Z</dc:date>
    <item>
      <title>Far pointer problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160042#M4355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a simple ROM CRC routine, but for some reason I'm only able to access up to 16 bit memory addresses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unsigned long* _far&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;temp_address;&lt;/P&gt;&lt;P&gt;unsigned long&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;temp_address = (unsigned long* _far) 0x088000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;value = *(temp_address);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;temp_address is correctly set, however when I attempt to read the value at that address, I'm getting the value from address 0x8000.&amp;nbsp;&amp;nbsp; Any suggestions are appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MC9S12P128&lt;/P&gt;&lt;P&gt;CodeWarrior Version 5.9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 16:16:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160042#M4355</guid>
      <dc:creator>foo222</dc:creator>
      <dc:date>2010-11-03T16:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Far pointer problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160043#M4356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;OL&gt;&lt;LI&gt;Hello&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compiler is using run time library call _LOAD_FAR_16 to load data from banked memory,&lt;/P&gt;&lt;P&gt;For this to work:&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1- Make sure to link your application with datapage.c&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2- Make sure to place the section NON_BANKED in non banked memory in your .prm file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For HCS12P family microcontrollers, you need to update datapage.c to specify the appropriate PPAGE register (0x15)&lt;/P&gt;&lt;P&gt;This is done as follows in datapage.c:&lt;/P&gt;&lt;PRE&gt;/* Compile with option -DHCS12 to activate this code */#if defined(HCS12) || defined(_HCS12) || defined(__HCS12__) /* HCS12 family has PPAGE register only at 0x30 */#if defined (HCS12P) /* HC912P128, HCS12P96, HCS12P64, HCS12P32 derivative has PPAGE register only at 0x15 */#define PPAGE_ADDR (0x15+REGISTER_BASE)#else#define PPAGE_ADDR (0x30+REGISTER_BASE)#endif#ifndef __PPAGE__ /* may be set already by option -CPPPAGE */#define __PPAGE__#endif/* Compile with option -DDG128 to activate this code */#elif defined DG128 /* HC912DG128 derivative has PPAGE register only at 0xFF */#define PPAGE_ADDR (0xFF+REGISTER_BASE)#ifndef __PPAGE__ /* may be set already by option -CPPPAGE */#define __PPAGE__#endif#elif defined(HC812A4)/* all setting default to A4 already */#endif&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure to add the option -DHCS12P when building your project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:05:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160043#M4356</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2020-10-29T09:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Far pointer problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160044#M4357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that did it, thanks very much for your help, it is appreciated!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 20:41:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Far-pointer-problem/m-p/160044#M4357</guid>
      <dc:creator>foo222</dc:creator>
      <dc:date>2010-11-03T20:41:51Z</dc:date>
    </item>
  </channel>
</rss>

