This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

#pragma INTERRUPT(IRQ) is ignored on template method of template

Other Parts Discussed in Thread: TMS570LS1224

Hi,

I'm have TI ARM Compiler v5.2.6 (linux version), target device is TMS570LS1224 and found problem on C++ templates and #pragma INTERRUPT(IRQ).

In next example #pragma INTERRUPT(IRQ) is ignored and no warning is issued. Static method interruptHandler() is compiled as *normal* method.

//header file

template <typename InterruptDriver>
class Foo {
   template<std::size_t INT_CHANNEL>
   static void interruptHandler();
}

#pragma INTERRUPT(IRQ)
template <typename InterruptDriver>
template<std::size_t INT_CHANNEL>
static void interruptHandler()
{
   //some code
}

If merhod body is inlined into class (template) declaration like in next example, everything is OK. Method is compiled as IRQ handler.

//header file

template <typename InterruptDriver>
class Foo {

#pragma INTERRUPT(IRQ)
  template<std::size_t INT_CHANNEL>
  static void interruptHandler() {
     //some code
   }
}

I belive, that first example should work too, or am I wrong?

Thanks

Libor Votocek*