<?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>Kinetis Software Development KitのトピックLPC546xx  __disable_irq() linker error when called from .c file in a C++ project</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/LPC546xx-disable-irq-linker-error-when-called-from-c-file-in-a-C/m-p/965700#M7982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone stumbled upon this linker error ?&lt;/P&gt;&lt;P&gt;arm-none-eabi-c++ -nostdlib&lt;/P&gt;&lt;P&gt;-Xlinker --gc-sections -Xlinker&lt;/P&gt;&lt;P&gt;-print-memory-usage -Xlinker&lt;/P&gt;&lt;P&gt;--sort-section=alignment&lt;/P&gt;&lt;P&gt;-mcpu=cortex-m4&lt;/P&gt;&lt;P&gt;-mfpu=fpv4-sp-d16&lt;/P&gt;&lt;P&gt;-mfloat-abi=hard&lt;/P&gt;&lt;P&gt;-mthumb&lt;/P&gt;&lt;P&gt;-lpower_hardabi&lt;/P&gt;&lt;P&gt;other.c:68: &lt;STRONG&gt;undefined reference to `__enable_irq'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling it from a C++ file seem to link just fine.&lt;/P&gt;&lt;P&gt;Project is set to use&amp;nbsp;&lt;STRONG style="background-color: #ffffff; color: #51626f; "&gt;NewlibNano.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jul 2019 17:20:55 GMT</pubDate>
    <dc:creator>gbarcan</dc:creator>
    <dc:date>2019-07-10T17:20:55Z</dc:date>
    <item>
      <title>LPC546xx  __disable_irq() linker error when called from .c file in a C++ project</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/LPC546xx-disable-irq-linker-error-when-called-from-c-file-in-a-C/m-p/965700#M7982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone stumbled upon this linker error ?&lt;/P&gt;&lt;P&gt;arm-none-eabi-c++ -nostdlib&lt;/P&gt;&lt;P&gt;-Xlinker --gc-sections -Xlinker&lt;/P&gt;&lt;P&gt;-print-memory-usage -Xlinker&lt;/P&gt;&lt;P&gt;--sort-section=alignment&lt;/P&gt;&lt;P&gt;-mcpu=cortex-m4&lt;/P&gt;&lt;P&gt;-mfpu=fpv4-sp-d16&lt;/P&gt;&lt;P&gt;-mfloat-abi=hard&lt;/P&gt;&lt;P&gt;-mthumb&lt;/P&gt;&lt;P&gt;-lpower_hardabi&lt;/P&gt;&lt;P&gt;other.c:68: &lt;STRONG&gt;undefined reference to `__enable_irq'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calling it from a C++ file seem to link just fine.&lt;/P&gt;&lt;P&gt;Project is set to use&amp;nbsp;&lt;STRONG style="background-color: #ffffff; color: #51626f; "&gt;NewlibNano.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2019 17:20:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/LPC546xx-disable-irq-linker-error-when-called-from-c-file-in-a-C/m-p/965700#M7982</guid>
      <dc:creator>gbarcan</dc:creator>
      <dc:date>2019-07-10T17:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: LPC546xx  __disable_irq() linker error when called from .c file in a C++ project</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/LPC546xx-disable-irq-linker-error-when-called-from-c-file-in-a-C/m-p/965701#M7983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/gbarcan@dialight.com"&gt;gbarcan@dialight.com&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the wrong library variant, then you will see build errors of the form:&lt;BR /&gt;"Undefined reference to ‘xxx’"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For information about the library variants I suggest you to check chapter 17.2 Library variants of MCUXpresso IDE User Guide&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf" target="test_blank"&gt;https://www.nxp.com/docs/en/user-guide/MCUXpresso_IDE_User_Guide.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I will suggest to check the following link with tips for mixing C and C++:&lt;BR /&gt;&lt;A href="https://isocpp.org/wiki/faq/mixing-c-and-cpp" target="test_blank"&gt;https://isocpp.org/wiki/faq/mixing-c-and-cpp&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know if this helps&lt;BR /&gt;Best regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Omar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 23:09:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/LPC546xx-disable-irq-linker-error-when-called-from-c-file-in-a-C/m-p/965701#M7983</guid>
      <dc:creator>Omar_Anguiano</dc:creator>
      <dc:date>2019-07-12T23:09:57Z</dc:date>
    </item>
  </channel>
</rss>

