<?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のトピックRe: S12X CW4.5 Linker and variables</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133823#M1461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;Try it this way:&lt;BR /&gt;&lt;BR /&gt;Modify your linker.prm.&lt;BR /&gt;In the SEGMENTS section write:&lt;BR /&gt;EXTERNAL_INT = READ_WRITE 0x100000'G TO 0x100001'G;&lt;BR /&gt;In the PLACEMENT section write:&lt;BR /&gt;MY_INT INTO EXTERNAL_INT&lt;BR /&gt;&lt;BR /&gt;To access these locations from C as an integer variably type in your C code:&lt;BR /&gt;#pragma DATA_SEG MY_INT&lt;BR /&gt;int my_int;&lt;BR /&gt;#pragma DATA_SEG DEFAULT&lt;BR /&gt;&lt;BR /&gt;Now you should have an 'int' variable at address 100000'G&lt;BR /&gt;Hope that helps.&lt;BR /&gt;pittbull&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Apr 2006 20:16:09 GMT</pubDate>
    <dc:creator>pittbull</dc:creator>
    <dc:date>2006-04-27T20:16:09Z</dc:date>
    <item>
      <title>S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133821#M1459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I'm am trying to allocate variable in external RAM on the S12x in global addresses i.e 0x100000 or 0x400000&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I specify these addresses in the&amp;nbsp; the linker prm file. (There is a note in the linker file indicating addresses should be specified as logical addresses, though)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When debugging the address of the variables are missing the top 8 bits, i.e. they appear as 0x0000.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So, my question is, how do I specifiy in the linker file, or source file, such that a variable will have an address that is only avaiable via the global address space.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And does that question make sense!??&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 16:52:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133821#M1459</guid>
      <dc:creator>gravity</dc:creator>
      <dc:date>2006-04-27T16:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133822#M1460</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 not sure if it answers your question, but take a look at the GlobalAddressing project&amp;nbsp;found among the CW examples (...\(CodeWarrior_Examples)\HCS12X\GlobalAddressing).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sten&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 19:26:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133822#M1460</guid>
      <dc:creator>Sten</dc:creator>
      <dc:date>2006-04-27T19:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133823#M1461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;Try it this way:&lt;BR /&gt;&lt;BR /&gt;Modify your linker.prm.&lt;BR /&gt;In the SEGMENTS section write:&lt;BR /&gt;EXTERNAL_INT = READ_WRITE 0x100000'G TO 0x100001'G;&lt;BR /&gt;In the PLACEMENT section write:&lt;BR /&gt;MY_INT INTO EXTERNAL_INT&lt;BR /&gt;&lt;BR /&gt;To access these locations from C as an integer variably type in your C code:&lt;BR /&gt;#pragma DATA_SEG MY_INT&lt;BR /&gt;int my_int;&lt;BR /&gt;#pragma DATA_SEG DEFAULT&lt;BR /&gt;&lt;BR /&gt;Now you should have an 'int' variable at address 100000'G&lt;BR /&gt;Hope that helps.&lt;BR /&gt;pittbull&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 20:16:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133823#M1461</guid>
      <dc:creator>pittbull</dc:creator>
      <dc:date>2006-04-27T20:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133824#M1462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Just a small correction here.&lt;/P&gt;&lt;P&gt;Make sure to define your variable in a __GPAGE_SEG segment as follows:&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG __GPAGE_SEG MY_INT&lt;BR /&gt;int my_int;&lt;BR /&gt;#pragma DATA_SEG DEFAULT&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 01:37:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133824#M1462</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-04-28T01:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133825#M1463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks. That exactly the answer I was looking for. I did'nt know how to specify global addresses in the linker file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And additional Question.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In the S12 there was a file datapage.c which had several far access runtime routines (LOAD_FAR, STORE_FAR). I used these to intercept far access and redirect them to port driven RAM routines.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;These datapage routines no longer seem available. I'd rather not go through my code and explicitly use my Port driven RAM I/O routines directly.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I could compile as S12 but then I lose all that paged RAM etc.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any ideas?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 06:42:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133825#M1463</guid>
      <dc:creator>gravity</dc:creator>
      <dc:date>2006-04-28T06:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133826#M1464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The compiler will use the new Global addressing instructions instead of the code sections to access the global variables. There is very little overhead using global addressing with HCS(X) core.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are using the standard HCS core then the old datapage routines will be needed.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 06:58:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133826#M1464</guid>
      <dc:creator>Technoman64</dc:creator>
      <dc:date>2006-04-28T06:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: S12X CW4.5 Linker and variables</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133827#M1465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Yeah,&lt;/P&gt;&lt;P&gt;Thats what I figured. With the S12 I could do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nvm.data = 0x23;&lt;/P&gt;&lt;P&gt;and it would be routed through the datapage routines because nvm was mapped to a far (but not physically present) address. Now I'll have to change it to&lt;/P&gt;&lt;P&gt;NVMWrite( nvm.data, 0x23);&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>Fri, 28 Apr 2006 09:02:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/S12X-CW4-5-Linker-and-variables/m-p/133827#M1465</guid>
      <dc:creator>gravity</dc:creator>
      <dc:date>2006-04-28T09:02:02Z</dc:date>
    </item>
  </channel>
</rss>

