1

While compiling in CCS6, I encountered this error:

#10056 symbol "__TI_int47" redefined

(Compiling for the MSP430 using Code Composer Studio by Texas Instruments)

It happens when declaring an Interrupt Service Routine, such as:

#pragma vector=PORT1_VECTOR
__interrupt void P1input_ISR ()
{
    P1IFG &= ~BIT0; // mark interrupt as "handled"
}

What causes these anonymous-looking symbols to be generated?

How can the code be tracked down that generated the symbol?

Brent Faust
  • 9,103
  • 6
  • 53
  • 57

2 Answers2

3

PORT1_vector is 47. #pragma vector 47 in CCS and IAR causes the following function to be installed for interrupt 47. Under the hood, evidently, it does that by defining a symbol named __TI_int47 that the linker will later use to populate the interrupt vector table. The error comes about because two different functions are defined for the same vector, which isn't possible.

hobbs
  • 223,387
  • 19
  • 210
  • 288
  • Excellent answer. For a PERL guy, you sure know your stuff. Too bad they don't generate something a little more intuitive, such as `port1_vector` as the function name. – Brent Faust Sep 28 '14 at 06:15
1

The symbol __TI_int47 is probably some sort of alias for your ISR function. It is just an internal implementation detail for how one part of the compiler communicates to another part the information about what ISRs you have defined. The pragma you posted probably causes it to be defined. I bet that PORT1_VECTOR is defined as 47 by a processor-specific header file.

It sounds like there are multiple pieces of code in your project defining the same ISR so you will need to remove one or perhaps call one from the other.

David Grayson
  • 84,103
  • 24
  • 152
  • 189