0

I am placing some new C software routines together with an existing arrangement of assembly language.

I am finding these errors

    multiple definition of `_U1RXInterrupt'
    multiple definition of `_U2RXInterrupt'
    multiple definition of `_U3RXInterrupt'

Where, when, how, do I get the C compiler to let me have the U1RXInterrupt for my assembly routines ? Ditto for U2RXInterrupt

Update, 2013-MAR-13

Just found this in the C code. Is this the source of my problems ? IF I take take this away, will my conflicts be over ?

   //********************U1RX interrupt********************************//
   void __attribute__ ((interrupt, no_auto_psv)) _U1RXInterrupt(void) 
   {
    IFS0bits.U1RXIF = 0;
    U1Buf_RX=U1RXREG;
    //putcharUART2(U1Buf_RX);
   }

I want my assembly language routines to handle Uart 1

I'm guessing that I will find a similar handler for U2RXInterrupt(void)

User.1
  • 2,562
  • 3
  • 33
  • 40
  • These are probably defined by the library of assembly code, not the compiler. Look in the library and see if the functions are there. If so, see if they have some kind of "hook" you could put your ISR in. – nneonneo Mar 12 '13 at 22:07
  • Where do I find the library ? Does it have a name ? What does it look like ? – User.1 Mar 12 '13 at 22:21
  • Uh, it's whatever your "existing arrangement of assembly language" is. – nneonneo Mar 12 '13 at 22:22

1 Answers1

1

You can only define one subroutine for a given interrupt. Whatever an ISR is defined through C code or assembler, it must be unique in your application.

So if you want to use your assembler ISR, you must either remove the other one from the C code or not link your application with the object or library that brings it.

greydet
  • 5,509
  • 3
  • 31
  • 51