<?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>LPC Microcontrollers中的主题 Re: Redefine a weak IRQ handler using linker directives/macros or any other trick</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578891#M19906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Thu Feb 19 01:27:51 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Your program is looking good for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you checked the linker map output file? Which function name is generated for the IRQ handler?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:20:22 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:20:22Z</dc:date>
    <item>
      <title>Redefine a weak IRQ handler using linker directives/macros or any other trick</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578890#M19905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gnxp on Wed Feb 18 08:39:19 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Environment - KEIL ARMcc v5.05 compiler, ARMlink v5.05 linker&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello experts,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is not a lpc17xx but&amp;nbsp; a more generic question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to create&amp;nbsp; a base project which can be reused for same or similar processors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to create interrupt handlers which can be defined/declared by a macro and can over-ride the default weak definition.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For. e.g&amp;nbsp; I want to write DBG port handler but I want the next person to chose what UART he wants by just changing a macro in header file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#define DBG_UART&amp;nbsp;&amp;nbsp;&amp;nbsp; UART0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* The following macro will create&amp;nbsp; text void UART0_IRQhandler */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MAKE_IRQH(x)void x##_IRQHandler(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define IRQH(x)MAKE_IRQH(x)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So in my dbg.c file I write &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IRQH(DBG_UART)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/........ UART handling stuff ...../&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My intention is that next person can take this project and just change say UART0 to UART1 and won't need to change dbg.c file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The above thing doesn't work, and my code still hits default handler as though void UART0_IRQhandler has not been defined.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you guys have any other way of accomplishing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:20:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578890#M19905</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Redefine a weak IRQ handler using linker directives/macros or any other trick</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578891#M19906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Thu Feb 19 01:27:51 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Your program is looking good for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you checked the linker map output file? Which function name is generated for the IRQ handler?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:20:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578891#M19906</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Redefine a weak IRQ handler using linker directives/macros or any other trick</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578892#M19907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gnxp on Thu Feb 19 02:34:59 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you. I was using same UART in different places, mistake on my part. It works now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:20:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Redefine-a-weak-IRQ-handler-using-linker-directives-macros-or/m-p/578892#M19907</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:20:23Z</dc:date>
    </item>
  </channel>
</rss>

