<?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のトピックCodeWarrior Linker Omits Modules</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CodeWarrior-Linker-Omits-Modules/m-p/214097#M6109</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;I'm using CodeWarrior v5.1, targeting a 9S12XEQ512.&amp;nbsp; I'm using the command line tools, with a hand-build linker script file. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been working fine for months.&amp;nbsp; Last week, I added a dozen more lines of code and a couple more variables, and now it won't link.&amp;nbsp; At first, I suspected that I'd run out of memory in one page or another.&amp;nbsp; After studying the maps (both before and after failure) in detail, I observe:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; For whatever reason, CodeWarrior omits 3 object modules from the link.&amp;nbsp; They simply no longer are listed in the FILE SECTION in the map. &lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The linker issues warnings for several declarations that it thinks I did not supply definitions for.&amp;nbsp; In reality, the definitions are in the modules that are ommitted.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Every section of memory (.text, .bss, .data, copy down, et al) has more than sufficient space available, usually by a factor of two.&amp;nbsp; I can't find any placement section overflows anywhere. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not seem like an especially large project.&amp;nbsp; I have used space in only 5 flash pages, leaving 11 still unused.&amp;nbsp; I'm using about 5K of a 12K RAM area.&amp;nbsp; I do have a lot of global symbols (~1214), but I'd think that CW should be able to handle that.&amp;nbsp; There are 78 object modules.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For what it is worth, some more details:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I'm using the XGATE on the part. The XGATE code, data, verctors, etc occupy about 2.2K, and is in RAM.&amp;nbsp; The start-up copydown loads the XGATE's RAM.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; My three missing modules are three (of four) containing the XGATE code and infrastructure.&amp;nbsp; At first, I thougth my problem had something to do with the XGATE.&amp;nbsp; But I have not touched that code in months.&amp;nbsp; I have good version control, so I would see if there was some inadvertant changes.&amp;nbsp; My present hypothesis is that the reason for the XGATE modules to be missing (vs something else) is that I alphabetize all of my lists of files.&amp;nbsp; The XGATE source files have a (helpful) XG prefix, so they are at the end of the file list.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, I think I've ruled out a lot of the easy possiblities. &lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Has anyone ever run across a similar type of problem?&amp;nbsp; I don't want to be too quick to blame the tool chain.&amp;nbsp; However, I'm speculating that perhaps I've over-stressed the linker's internal working pool of memory.&amp;nbsp; I just can't imagine how else the linker would simply refuse to say anything about the three missing object files.&amp;nbsp; Maybe the linker tries to open all 78 object files at one time, and runs out of file handles, or or internal buffer space, or something.&amp;nbsp; BTW, the linker fails identically on both my PC (Win7, 4GB RAM) and my laptop (Win XP).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; I don't know if this will help, but I'm contemplating replacing my single link with a partial link step, followed by a complete link.&amp;nbsp; In other words, try to do two smaller links.&amp;nbsp; Maybe that would reduce the overall demands on the linker.&amp;nbsp; Any thoughts on how to best approach this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. If anyone has a similar sized project (or larger), I'd appreciate hearing that it links OK.&amp;nbsp; I'd be interested in how many object files, rough code and data size, and approximate number of global symbols.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; Any other suggestions?&amp;nbsp; I'm rather stuck here.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;Dave Kellogg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Oct 2012 21:27:42 GMT</pubDate>
    <dc:creator>davekellogg</dc:creator>
    <dc:date>2012-10-10T21:27:42Z</dc:date>
    <item>
      <title>CodeWarrior Linker Omits Modules</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CodeWarrior-Linker-Omits-Modules/m-p/214097#M6109</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;I'm using CodeWarrior v5.1, targeting a 9S12XEQ512.&amp;nbsp; I'm using the command line tools, with a hand-build linker script file. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This has been working fine for months.&amp;nbsp; Last week, I added a dozen more lines of code and a couple more variables, and now it won't link.&amp;nbsp; At first, I suspected that I'd run out of memory in one page or another.&amp;nbsp; After studying the maps (both before and after failure) in detail, I observe:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; For whatever reason, CodeWarrior omits 3 object modules from the link.&amp;nbsp; They simply no longer are listed in the FILE SECTION in the map. &lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The linker issues warnings for several declarations that it thinks I did not supply definitions for.&amp;nbsp; In reality, the definitions are in the modules that are ommitted.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Every section of memory (.text, .bss, .data, copy down, et al) has more than sufficient space available, usually by a factor of two.&amp;nbsp; I can't find any placement section overflows anywhere. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not seem like an especially large project.&amp;nbsp; I have used space in only 5 flash pages, leaving 11 still unused.&amp;nbsp; I'm using about 5K of a 12K RAM area.&amp;nbsp; I do have a lot of global symbols (~1214), but I'd think that CW should be able to handle that.&amp;nbsp; There are 78 object modules.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For what it is worth, some more details:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I'm using the XGATE on the part. The XGATE code, data, verctors, etc occupy about 2.2K, and is in RAM.&amp;nbsp; The start-up copydown loads the XGATE's RAM.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; My three missing modules are three (of four) containing the XGATE code and infrastructure.&amp;nbsp; At first, I thougth my problem had something to do with the XGATE.&amp;nbsp; But I have not touched that code in months.&amp;nbsp; I have good version control, so I would see if there was some inadvertant changes.&amp;nbsp; My present hypothesis is that the reason for the XGATE modules to be missing (vs something else) is that I alphabetize all of my lists of files.&amp;nbsp; The XGATE source files have a (helpful) XG prefix, so they are at the end of the file list.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point, I think I've ruled out a lot of the easy possiblities. &lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Has anyone ever run across a similar type of problem?&amp;nbsp; I don't want to be too quick to blame the tool chain.&amp;nbsp; However, I'm speculating that perhaps I've over-stressed the linker's internal working pool of memory.&amp;nbsp; I just can't imagine how else the linker would simply refuse to say anything about the three missing object files.&amp;nbsp; Maybe the linker tries to open all 78 object files at one time, and runs out of file handles, or or internal buffer space, or something.&amp;nbsp; BTW, the linker fails identically on both my PC (Win7, 4GB RAM) and my laptop (Win XP).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; I don't know if this will help, but I'm contemplating replacing my single link with a partial link step, followed by a complete link.&amp;nbsp; In other words, try to do two smaller links.&amp;nbsp; Maybe that would reduce the overall demands on the linker.&amp;nbsp; Any thoughts on how to best approach this?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. If anyone has a similar sized project (or larger), I'd appreciate hearing that it links OK.&amp;nbsp; I'd be interested in how many object files, rough code and data size, and approximate number of global symbols.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp; Any other suggestions?&amp;nbsp; I'm rather stuck here.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;Dave Kellogg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 21:27:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CodeWarrior-Linker-Omits-Modules/m-p/214097#M6109</guid>
      <dc:creator>davekellogg</dc:creator>
      <dc:date>2012-10-10T21:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: CodeWarrior Linker Omits Modules</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CodeWarrior-Linker-Omits-Modules/m-p/214098#M6110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dave,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have good ideas, but&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Linker should follow specified link order and not alphabetize modules. Using IDE, link order is specified in link order tab. Using build script, I think it should follow the order in some list of modules.&lt;/LI&gt;&lt;LI&gt;Since you are speaking about several XGATE files in the same project. I hope you know that&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;#include &amp;lt;hidef.h&amp;gt;&lt;/P&gt;&lt;P&gt;on top of CW project wizard generated xgate.cxgate file is not optional but mandatory! This line should be present in all XGATE C modules, because hidef.h contains important #pragmas, which let XGATE code, data and consts to be placed into XGATE specific placements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 13:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CodeWarrior-Linker-Omits-Modules/m-p/214098#M6110</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2012-10-11T13:09:14Z</dc:date>
    </item>
  </channel>
</rss>

