<?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>Classic/Legacy CodeWarriorのトピックRe: Linker Error: symbol too far way for a R_56800E_BYTE16 relocation</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148684#M1941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;J2MEJediMaster,&lt;BR /&gt;&lt;BR /&gt;Thanks for your insight!&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2007 02:13:09 GMT</pubDate>
    <dc:creator>Dime</dc:creator>
    <dc:date>2007-10-09T02:13:09Z</dc:date>
    <item>
      <title>Linker Error: symbol too far way for a R_56800E_BYTE16 relocation</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148680#M1937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;I am using a 56f8345 micro with CodeWarrior 7.3.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my program I have created many byte arrays for storing screen and field data.&amp;nbsp; I specified that these arrays should reside in the program flash.&amp;nbsp; Here is an example of one such array:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__pmem const byte S_PA_LOW[] =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HED,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; POS, 41, 'L','o','w',' ','L','i','m','i','t',':', DWN, END&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This worked great early on.&amp;nbsp; After a while, however, I began receiving many linker errors similar to the following: &lt;/SPAN&gt;&lt;SPAN style="color: #0099FF;"&gt;symbol FS_PA_LOW referenced from address 0x00011830 in section .data.pmem is too far way for a R_56800E_BYTE16 relocation, which has a range of 0 to 65535 bytes&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone out there have a good explanation of what is going on?&amp;nbsp; Any ideas on a solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2007 23:01:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148680#M1937</guid>
      <dc:creator>Dime</dc:creator>
      <dc:date>2007-09-21T23:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Linker Error: symbol too far way for a R_56800E_BYTE16 relocation</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148681#M1938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;The linker error message says it all. The array elements are being referenced using a 16-bit value, and the contents of your array have grown larger than what can be addressed using sixteen bits. You're going to have to either break the array up, or make the compiler generate a 32-bit offset for your array. Check the compiler and linker documentation for information on how accesses to arrays are implemented.&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by J2MEJediMaster on &lt;SPAN class="date_text"&gt;2007-09-26&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:13 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Sep 2007 20:47:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148681#M1938</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2007-09-24T20:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Linker Error: symbol too far way for a R_56800E_BYTE16 relocation</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148682#M1939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Thanks for the reply.&amp;nbsp; Please excuse my ignorance as I try to get a better picture of what is going on.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In my program I have many small arrays.&amp;nbsp; None of the arrays are greater than 80 bytes long.&amp;nbsp; So I'm confused by your comments that the contents of my array have grown larger than what can be addressed using sixteen bits.&amp;nbsp; In my opinion I have a different problem.&amp;nbsp; Let me try to clarify my situation.&amp;nbsp; I have a constant array that holds information about all of my screens (number of fields, screen type, etc...).&amp;nbsp; As part of this array there are pointers to the actual arrays that contain the data that makes up the screen.&amp;nbsp; It seems to me like the linker error message is indicating that the screen data arrays are located too far away from the array that references them.&amp;nbsp; All of these arrays, however, are declared as __pmem const byte arrays.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In the process of "just trying things" I enabled Large Memory Model support in the project options.&amp;nbsp; I then included the appropriate large memory model run time libraries.&amp;nbsp; This "fixed" my problem, however, I'm not sure I fully understand the all of the differences between large and small memory models.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does this solution make sense to you?&amp;nbsp; Can you point me in the direction of a good document that lays out how each of the different memory models work?&lt;BR /&gt;&lt;BR /&gt;Thank You&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 22:03:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148682#M1939</guid>
      <dc:creator>Dime</dc:creator>
      <dc:date>2007-10-08T22:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Linker Error: symbol too far way for a R_56800E_BYTE16 relocation</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148683#M1940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The pointers used to reference the arrays used only 16 bits, and so when you had enough arrays that required the use of a memory space larger than could be accessed by sixteen-bit pointer, you got the error.&lt;BR /&gt;&lt;BR /&gt;I'm not that familiar with the ColdFire memory models, but I can speak to your fix in general terms. A small memory model means everything fits (typically) within 64KB of memory. Or, code occupies one 64KB region, and data another 64KB region. Pointers are therefore, sixteen bits in size.&lt;BR /&gt;&lt;BR /&gt;A large memory model can access memory regions larger than 64 KB. Depending upon the MCU, the pointers might be 24- or 32-bits in size in order to reference the larger memory regions. The compiler can be instructed to generate the appropriate code and pointer size if you specify a memory model during compilation. The large memory model compilation fixed your problem because the 32-bit pointers the compiler generated were capable of addressing all of your arrays.&lt;BR /&gt;&lt;BR /&gt;The memory model scheme serves to optimize the code for applications that either use a small amount of data (small model) or a large amount (large model).&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 00:07:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148683#M1940</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2007-10-09T00:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Linker Error: symbol too far way for a R_56800E_BYTE16 relocation</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148684#M1941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;J2MEJediMaster,&lt;BR /&gt;&lt;BR /&gt;Thanks for your insight!&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2007 02:13:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Linker-Error-symbol-too-far-way-for-a-R-56800E-BYTE16-relocation/m-p/148684#M1941</guid>
      <dc:creator>Dime</dc:creator>
      <dc:date>2007-10-09T02:13:09Z</dc:date>
    </item>
  </channel>
</rss>

