<?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>LPCXpresso IDE FAQs中的主题 Interrupt Handlers in C++ applications</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Interrupt-Handlers-in-C-applications/m-p/470665#M66</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create a project using the LPCXpresso IDE project wizard, the startup code generated contains a set of default interrupt handlers, dependent upon the target MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These default interrupt handlers are defined as weak so that if your main application provides an implementation, this will be used instead of the default in the generated executable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if your application is a C++ one then any interrupt handlers defined in C++ files within in your main application will need to have C linkage rather than C++ linkage. To do this, make sure that you use &lt;TT&gt;extern "C" { .... }&lt;/TT&gt; around the interrupt handler within your main application code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details, please see you favorite C++ text book, alternatively an internet search will bring up lots of useful links - for example:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCompatibility_of_C_and_C%252B%252B%23Linking_C_and_C.2B.2B_code"&gt;http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B#Linking_C_and_C.2B.2B_code&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2016 19:49:30 GMT</pubDate>
    <dc:creator>lpcware-support</dc:creator>
    <dc:date>2016-03-31T19:49:30Z</dc:date>
    <item>
      <title>Interrupt Handlers in C++ applications</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Interrupt-Handlers-in-C-applications/m-p/470665#M66</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you create a project using the LPCXpresso IDE project wizard, the startup code generated contains a set of default interrupt handlers, dependent upon the target MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These default interrupt handlers are defined as weak so that if your main application provides an implementation, this will be used instead of the default in the generated executable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However if your application is a C++ one then any interrupt handlers defined in C++ files within in your main application will need to have C linkage rather than C++ linkage. To do this, make sure that you use &lt;TT&gt;extern "C" { .... }&lt;/TT&gt; around the interrupt handler within your main application code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more details, please see you favorite C++ text book, alternatively an internet search will bring up lots of useful links - for example:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FCompatibility_of_C_and_C%252B%252B%23Linking_C_and_C.2B.2B_code"&gt;http://en.wikipedia.org/wiki/Compatibility_of_C_and_C%2B%2B#Linking_C_and_C.2B.2B_code&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 19:49:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Interrupt-Handlers-in-C-applications/m-p/470665#M66</guid>
      <dc:creator>lpcware-support</dc:creator>
      <dc:date>2016-03-31T19:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt Handlers in C++ applications</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Interrupt-Handlers-in-C-applications/m-p/1492559#M195</link>
      <description>&lt;P&gt;Very useful tip! It helped me with the same issue with MCUXpresso! Thank you very much!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 15:15:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Interrupt-Handlers-in-C-applications/m-p/1492559#M195</guid>
      <dc:creator>marles</dc:creator>
      <dc:date>2022-07-20T15:15:34Z</dc:date>
    </item>
  </channel>
</rss>

