<?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: Solving linker error in MCUXpresso in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1773299#M5228</link>
    <description>&lt;P&gt;Vielen Dank, Erich!&lt;/P&gt;&lt;P&gt;The compiler is creating the tusb.o object file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_0-1702403072497.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254026iEBCEC36EFA2E74FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_0-1702403072497.png" alt="drsmith_yorku_0-1702403072497.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And that object file comes from tusb.h and tusb.c (where tusb_init() is defined):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_1-1702403166003.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254027i8A0D02403EF12FC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_1-1702403166003.png" alt="drsmith_yorku_1-1702403166003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I saw your post about exclusion earlier and made sure that the exclusion check box was not checked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_2-1702403354639.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254028i52F6914D3EF90D1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_2-1702403354639.png" alt="drsmith_yorku_2-1702403354639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and I looked at the alternative that you suggested and it seems to be on the default (assuming that means include in build)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_3-1702403524339.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254029iCF1930370A540279/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_3-1702403524339.png" alt="drsmith_yorku_3-1702403524339.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all the best,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 17:52:38 GMT</pubDate>
    <dc:creator>drsmith_yorku</dc:creator>
    <dc:date>2023-12-12T17:52:38Z</dc:date>
    <item>
      <title>Solving linker error in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1772516#M5223</link>
      <description>&lt;P&gt;I'm trying to integrate the TinyUSB library within an MCUXpresso project but I'm running into an issue when when I try to call the tusb_init() function. &amp;nbsp; I get the following error, which appears to be associated with the linker:&lt;/P&gt;&lt;DIV&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Building target: MKL25Z4_Project_TinyUSB_v6.axf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Invoking: MCU Linker&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arm-none-eabi-gcc -nostdlib -L"/Users/drsmith/Documents/MCUXpressoIDE_11.8.1_1197/workspace/MKL25Z4_Project_TinyUSB_v6/tinyusb/src" -Xlinker -Map="MKL25Z4_Project_TinyUSB_v6.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m0plus -mthumb -T MKL25Z4_Project_TinyUSB_v6_Debug.ld -o "MKL25Z4_Project_TinyUSB_v6.axf" ./utilities/fsl_debug_console.o ./tinyusb/src/device/usbd.o ./tinyusb/src/device/usbd_control.o ./tinyusb/src/common/tusb_fifo.o ./tinyusb/src/class/video/video_device.o ./tinyusb/src/class/vendor/vendor_device.o ./tinyusb/src/class/vendor/vendor_host.o ./tinyusb/src/class/usbtmc/usbtmc_device.o ./tinyusb/src/class/net/ecm_rndis_device.o ./tinyusb/src/class/net/ncm_device.o ./tinyusb/src/class/msc/msc_device.o ./tinyusb/src/class/msc/msc_host.o ./tinyusb/src/class/midi/midi_device.o ./tinyusb/src/class/hid/hid_device.o ./tinyusb/src/class/hid/hid_host.o ./tinyusb/src/class/dfu/dfu_device.o ./tinyusb/src/class/dfu/dfu_rt_device.o ./tinyusb/src/class/cdc/cdc_device.o ./tinyusb/src/class/cdc/cdc_host.o ./tinyusb/src/class/cdc/cdc_rndis_host.o ./tinyusb/src/class/bth/bth_device.o ./tinyusb/src/class/audio/audio_device.o ./tinyusb/src/tusb.o ./startup/startup_mkl25z4.o ./source/MKL25Z4_Project_TinyUSB_v6.o ./source/mtb.o ./source/semihost_hardfault.o ./drivers/fsl_clock.o ./drivers/fsl_common.o ./drivers/fsl_flash.o ./drivers/fsl_gpio.o ./drivers/fsl_lpsci.o ./drivers/fsl_smc.o ./drivers/fsl_uart.o ./board/board.o ./board/clock_config.o ./board/peripherals.o ./board/pin_mux.o ./CMSIS/system_MKL25Z4.o &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/Applications/MCUXpressoIDE_11.8.1_1197/ide/plugins/com.nxp.mcuxpresso.tools.macosx_11.8.1.202308071233/tools/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld: ./source/MKL25Z4_Project_TinyUSB_v6.o: in function `main':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;/Users/drsmith/Documents/MCUXpressoIDE_11.8.1_1197/workspace/MKL25Z4_Project_TinyUSB_v6/Debug/../source/MKL25Z4_Project_TinyUSB_v6.c:43: undefined reference to `tusb_init'&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I've placed all the .c and .h files for TinyUSB within its own folder inside the workspace. &amp;nbsp;And&amp;nbsp;I've included the subfolders for the TinyUSB header and source files within Settings -&amp;gt; C/C++ General -&amp;gt; &amp;nbsp;Paths and Symbols&lt;/P&gt;&lt;P&gt;But I'm struggling to figure out how to ensure that the linker find functions like tusb_init(). &amp;nbsp; What's the preferred way to define paths for the linker in MCUXpresso?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Dec 2023 20:13:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1772516#M5223</guid>
      <dc:creator>drsmith_yorku</dc:creator>
      <dc:date>2023-12-11T20:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Solving linker error in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1772826#M5225</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;the linker error is about the fact that it does not find the function tusb_init(). Check your sources and find out where this function is located, and if the module for it (.o) is listed in the ones passed to the linker.&lt;/P&gt;&lt;P&gt;It could be that you have missed including/compiling that file or folder for it. Make sure the file or folder is not 'excluded from build', see &lt;A href="https://mcuoneclipse.com/2014/07/22/exclude-source-files-from-build-in-eclipse/" target="_blank"&gt;https://mcuoneclipse.com/2014/07/22/exclude-source-files-from-build-in-eclipse/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 06:38:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1772826#M5225</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-12-12T06:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Solving linker error in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1773299#M5228</link>
      <description>&lt;P&gt;Vielen Dank, Erich!&lt;/P&gt;&lt;P&gt;The compiler is creating the tusb.o object file:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_0-1702403072497.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254026iEBCEC36EFA2E74FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_0-1702403072497.png" alt="drsmith_yorku_0-1702403072497.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And that object file comes from tusb.h and tusb.c (where tusb_init() is defined):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_1-1702403166003.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254027i8A0D02403EF12FC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_1-1702403166003.png" alt="drsmith_yorku_1-1702403166003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I saw your post about exclusion earlier and made sure that the exclusion check box was not checked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_2-1702403354639.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254028i52F6914D3EF90D1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_2-1702403354639.png" alt="drsmith_yorku_2-1702403354639.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and I looked at the alternative that you suggested and it seems to be on the default (assuming that means include in build)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="drsmith_yorku_3-1702403524339.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254029iCF1930370A540279/image-size/medium?v=v2&amp;amp;px=400" role="button" title="drsmith_yorku_3-1702403524339.png" alt="drsmith_yorku_3-1702403524339.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all the best,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 17:52:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1773299#M5228</guid>
      <dc:creator>drsmith_yorku</dc:creator>
      <dc:date>2023-12-12T17:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Solving linker error in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1773323#M5229</link>
      <description>&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;what about the folder properties where the file is in?&lt;/P&gt;&lt;P&gt;Maybe the folder is not included into the build?&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:31:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1773323#M5229</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-12-12T18:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Solving linker error in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1775819#M5238</link>
      <description>&lt;P&gt;&amp;nbsp;Hi Erich,&lt;/P&gt;&lt;P&gt;still working on it... now putting all the files from TinyUSB into the main source folder... just to narrow down possible issues. &amp;nbsp;Now going to check linker folder lists...&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 02:00:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1775819#M5238</guid>
      <dc:creator>drsmith_yorku</dc:creator>
      <dc:date>2023-12-16T02:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Solving linker error in MCUXpresso</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1776697#M5244</link>
      <description>&lt;P&gt;Aha. I believe that I've figured it out. It had nothing to do with MCUXpresso's settings. They were fine. What was going on is that the TinyUSB library uses preprocessor defines in a configuration file that are then interpreted to include (or not) the header file. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I defined it properly, the linker was able to find the resulting object file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-12-18 at 9.27.03 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254922i46E218C472228422/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-12-18 at 9.27.03 PM.png" alt="Screen Shot 2023-12-18 at 9.27.03 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-12-18 at 9.29.30 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/254923i9059705071FD7307/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2023-12-18 at 9.29.30 PM.png" alt="Screen Shot 2023-12-18 at 9.29.30 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 02:31:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Solving-linker-error-in-MCUXpresso/m-p/1776697#M5244</guid>
      <dc:creator>drsmith_yorku</dc:creator>
      <dc:date>2023-12-19T02:31:11Z</dc:date>
    </item>
  </channel>
</rss>

