<?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: linker problem when compiling the code in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165671#M4829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The warning messages L1823 are generated because you have only external declarations for variable SwLEDData and tickCounter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one of your ANSI C source files you need to explicitly define the variables as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SwLEDDataType SwLEDData;&lt;/P&gt;&lt;P&gt;int tickCounter;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To remove the error message L1119 remove the line&lt;/P&gt;&lt;P&gt;VECTOR 0 _Startup&lt;/P&gt;&lt;P&gt;from your .prm file&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>Mon, 23 Mar 2009 17:14:08 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2009-03-23T17:14:08Z</dc:date>
    <item>
      <title>linker problem when compilin the code</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165669#M4827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a code of interrupt routines. I found an example project of "dashboard"of freescale. (the location of the file is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C:\Program Files\Freescale\CodeWarrior for HCS12 V4.7\(CodeWarrior_Examples)\HCS12X\S12X_Automotive_Cluster_Demo\dashboard.mcp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to modify this project. However, after I make some modifications I started to encounter some problems. It gives a linker error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the definition of this error is given below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[error]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;L1823: External object SwLEDData in C:\Users\ayyazilim\Documents\work\p23_03\p23_03_Data\Full_Chip_Simulation\ObjectCode\CPU12ISRs.c.o&lt;BR /&gt;created by default&lt;BR /&gt;&lt;BR /&gt;Project: p23_03.mcp, Target: Full Chip Simulation&lt;BR /&gt;&lt;BR /&gt;L1823: External object tickCounter in C:\Users\ayyazilim\Documents\work\p23_03\p23_03_Data\Full_Chip_Simulation\ObjectCode\CPU12ISRs.c.o&lt;BR /&gt;created by default&lt;BR /&gt;&lt;BR /&gt;Project: p23_03.mcp, Target: Full Chip Simulation&lt;BR /&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : L1119: Vector allocated at absolute address 0xFFFE overlaps with sections placed in segment .absSeg647&lt;BR /&gt;&lt;BR /&gt;Project: p23_03.mcp, Target: Full Chip Simulation&lt;BR /&gt;&lt;BR /&gt;Link Error&amp;nbsp;&amp;nbsp; : Link failed&lt;BR /&gt;Project: p23_03.mcp, Target: Full Chip Simulation&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;[/error]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached the project also. Can any one tell me the reason for this, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Ffiles%2Fcommunity_files%2FCW816COMM%2F5304_p23_03.zip" rel="nofollow" target="_blank"&gt;p23_03.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-10-22&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:15 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 14:14:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165669#M4827</guid>
      <dc:creator>yaprak</dc:creator>
      <dc:date>2009-03-23T14:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem when compilin the code</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165670#M4828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;You must make sure that the vector table is linked to the program. This isn't done, since CW can't see it used from anywhere in the code - it is just called from the hardware itself, but the compiler doesn't know that.&lt;BR /&gt;&lt;BR /&gt;First, you need to make the vector table global for the project, by putting a prototype in some h file:&lt;BR /&gt;&lt;BR /&gt;extern void (* near const vectors[])(void);&lt;BR /&gt;&lt;BR /&gt;Second, you need to enforce the linker to include the vector table through the prm file:&lt;BR /&gt;&lt;BR /&gt;ENTRIES&lt;BR /&gt;vectors&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;Third, you need to put the reset vector from the prm file into your own vector table. Remove the line&lt;BR /&gt;VECTOR 0 _Startup&lt;BR /&gt;from the prm file and set _Startup as the reset vector in your vector table. This is causing the overlap error.&lt;BR /&gt;&lt;BR /&gt;All interrupt service routines used in the vector table must have their prototypes visible to vectors.c or you will get linker errors from that too. That is, vectors.c needs to include all h files containing prototypes to interrupts.&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by Lundin on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-03-23&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:39 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2009 15:37:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165670#M4828</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2009-03-23T15:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: linker problem when compiling the code</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165671#M4829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The warning messages L1823 are generated because you have only external declarations for variable SwLEDData and tickCounter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In one of your ANSI C source files you need to explicitly define the variables as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SwLEDDataType SwLEDData;&lt;/P&gt;&lt;P&gt;int tickCounter;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To remove the error message L1119 remove the line&lt;/P&gt;&lt;P&gt;VECTOR 0 _Startup&lt;/P&gt;&lt;P&gt;from your .prm file&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>Mon, 23 Mar 2009 17:14:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/linker-problem-when-compilin-the-code/m-p/165671#M4829</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2009-03-23T17:14:08Z</dc:date>
    </item>
  </channel>
</rss>

