<?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 LPCopen linker problem: how to change the linker to the correct workspace? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743930#M54507</link>
    <description>&lt;P&gt;We are using MCUXpresso IDE 11.8 to build code for the LPC11U68 on our own PCB.&lt;/P&gt;&lt;P&gt;After recovering from a botched import of previously exported backup files, we got the build to function almost normally;&amp;nbsp; see &lt;LI-MESSAGE title="lpcopen project: problems with importing a saved project" uid="1740865" url="https://community.nxp.com/t5/LPC-Microcontrollers/lpcopen-project-problems-with-importing-a-saved-project/m-p/1740865#U1740865" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; .&lt;/P&gt;&lt;P&gt;Apparently there is a linker problem because there are 1200 errors having to do with the *.o files.&amp;nbsp; The errors are always the same:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;multiple definition of `SamplePumpBase';&amp;nbsp; for example.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Each variable as has the same error, (1200 vars.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Each error has the following text:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;FONT color="#993300"&gt;&lt;SPAN&gt;c:/nxp/mcuxpressoide_11.8.0_1165/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047/tools/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/clock.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/Defs_5.h:428: multiple definition of `SamplePumpBase'; ./src/Factory.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/defs_5.h:428: first defined here&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The compiler is working in the correct workspace.&amp;nbsp; &lt;STRONG&gt;The linker is working in a previous workspace!&amp;nbsp; (namely 11.3.0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How to fix? Doing a clean does not fix the problem.&lt;/P&gt;&lt;P&gt;jDrum&lt;/P&gt;</description>
    <pubDate>Sat, 21 Oct 2023 02:00:07 GMT</pubDate>
    <dc:creator>jDrum</dc:creator>
    <dc:date>2023-10-21T02:00:07Z</dc:date>
    <item>
      <title>LPCopen linker problem: how to change the linker to the correct workspace?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743930#M54507</link>
      <description>&lt;P&gt;We are using MCUXpresso IDE 11.8 to build code for the LPC11U68 on our own PCB.&lt;/P&gt;&lt;P&gt;After recovering from a botched import of previously exported backup files, we got the build to function almost normally;&amp;nbsp; see &lt;LI-MESSAGE title="lpcopen project: problems with importing a saved project" uid="1740865" url="https://community.nxp.com/t5/LPC-Microcontrollers/lpcopen-project-problems-with-importing-a-saved-project/m-p/1740865#U1740865" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; .&lt;/P&gt;&lt;P&gt;Apparently there is a linker problem because there are 1200 errors having to do with the *.o files.&amp;nbsp; The errors are always the same:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;multiple definition of `SamplePumpBase';&amp;nbsp; for example.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Each variable as has the same error, (1200 vars.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Each error has the following text:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;FONT color="#993300"&gt;&lt;SPAN&gt;c:/nxp/mcuxpressoide_11.8.0_1165/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.8.0.202306131047/tools/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: ./src/clock.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/Defs_5.h:428: multiple definition of `SamplePumpBase'; ./src/Factory.o:C:\Users\John\Documents\MCUXpressoIDE_11.3.0_5222\workspace\L3MM\Debug/../src/defs_5.h:428: first defined here&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;The compiler is working in the correct workspace.&amp;nbsp; &lt;STRONG&gt;The linker is working in a previous workspace!&amp;nbsp; (namely 11.3.0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How to fix? Doing a clean does not fix the problem.&lt;/P&gt;&lt;P&gt;jDrum&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 02:00:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743930#M54507</guid>
      <dc:creator>jDrum</dc:creator>
      <dc:date>2023-10-21T02:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen linker problem: how to change the linker to the correct workspace?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743952#M54509</link>
      <description>&lt;P&gt;A few tips:&lt;/P&gt;&lt;P&gt;- check the command line of the linker (you see it in the console) and carefully check what is passed. Is the object file in question with that variable with double definition in there twice?&lt;/P&gt;&lt;P&gt;- unlikely as you say it works in previous IDE version: I have seen similar cases where the code includes a .c file instead of the .h file: maybe search for .c" in your code.&lt;/P&gt;&lt;P&gt;- do a full clean-clean of your project (delete the build (debug) output) folder of your project and do a build again.&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 05:30:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743952#M54509</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-10-21T05:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen linker problem: how to change the linker to the correct workspace?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743966#M54510</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/17173"&gt;@ErichStyger&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried your suggestions with the following results.&lt;/P&gt;&lt;P&gt;We couldn't view the command line in the console because the 1200 errors pushed those lines off the screen.&lt;/P&gt;&lt;P&gt;A full clean/clean resulted in identical errors.&lt;/P&gt;&lt;P&gt;We looked at the do-not-edit makefile.&amp;nbsp; I does not identify the workspace &lt;STRONG&gt;path&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I suspect that a Windows reboot wiped out the correct IDE settings which means that we were updating code in the &lt;STRONG&gt;obsolete workspace&lt;/STRONG&gt;.&amp;nbsp; (It is not easy to check the identity of the workspace in the IDE). Somehow the current project name appeared in that workspace.&lt;/P&gt;&lt;P&gt;We plan to move the update scr code to the correct workspace and try again.&lt;/P&gt;&lt;P&gt;jDrum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 14:10:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1743966#M54510</guid>
      <dc:creator>jDrum</dc:creator>
      <dc:date>2023-10-21T14:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: LPCopen linker problem: how to change the linker to the correct workspace?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1744004#M54512</link>
      <description>&lt;P&gt;The &lt;STRONG&gt;short&lt;/STRONG&gt; answer to the linker problem was that almost all global variables were defined in the defs5.h file.&amp;nbsp; That file is called by several of the source files.&amp;nbsp; In the case that the source files are compiled separately, space for the variables will be assigned multiple times.&amp;nbsp; Apparently, IDE8_3 was able to compile the project in one go which means that the defs5 file was read only once.&lt;/P&gt;&lt;P&gt;In our case we defined a macro for EXTERN which changed the EXTERN to extern unless a separate #define was set (in main() only) .&amp;nbsp; This worked for the majority of cases and brought our linker error count down to ~100.&amp;nbsp; The rest were handled individually.&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;long&lt;/STRONG&gt; answer is more complicated.&amp;nbsp; We had a &lt;STRONG&gt;recurrence&lt;/STRONG&gt; of the problem of importing projects and their source code into a new workspace.&amp;nbsp; This was the topic of two previous posts.&amp;nbsp; When we have more time, we will revisit&amp;nbsp; those posts.&amp;nbsp; Briefly, we had a problem with starting a "new" project.&amp;nbsp; The new-project wizard would not accept our input for the chip and board files in step 5.&amp;nbsp; The browse buttons brought up totally empty screens.&lt;/P&gt;&lt;P&gt;We even re-installed the IDE (no change).&lt;/P&gt;&lt;P&gt;We now mark &lt;STRONG&gt;this&lt;/STRONG&gt; post as "solved"&lt;/P&gt;&lt;P&gt;jDrum&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 21:59:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCopen-linker-problem-how-to-change-the-linker-to-the-correct/m-p/1744004#M54512</guid>
      <dc:creator>jDrum</dc:creator>
      <dc:date>2023-10-22T21:59:07Z</dc:date>
    </item>
  </channel>
</rss>

