PORTX_PORT_vect compilation errors

here below is the declaration from the iom4809.h

/* PORTF interrupt vectors */
#define PORTF_PORT_vect_num  29
#define PORTF_PORT_vect      _VECTOR(29)  /*  */

Accordingly for eg i am declaring in my program the ISR for port F as below:

ISR(PORTF_PORT_vect)
{

// my isr code here
}

following are the compilation errors for the nano every board. the errors are for PORTF,E,A ISRs that i need for my project

WInterrupts.cpp.o (symbol from plugin): In function attachInterruptParam': (.text+0x0): multiple definition of __vector_6'
C:\Users\VijayMargret\AppData\Local\Temp\arduino\sketches\25C80779F7BB047EC1CBDBEBDC5DBAE9\sketch\HCA_OptiSense.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
WInterrupts.cpp.o (symbol from plugin): In function attachInterruptParam': (.text+0x0): multiple definition of __vector_35'
C:\Users\VijayMargret\AppData\Local\Temp\arduino\sketches\25C80779F7BB047EC1CBDBEBDC5DBAE9\sketch\HCA_OptiSense.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
WInterrupts.cpp.o (symbol from plugin): In function attachInterruptParam': (.text+0x0): multiple definition of __vector_29'
C:\Users\VijayMargret\AppData\Local\Temp\arduino\sketches\25C80779F7BB047EC1CBDBEBDC5DBAE9\sketch\HCA_OptiSense.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status

exit status 1

Any help wud be gr8!!

Below compiles fine for the Nano Every (emulation: none).

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

ISR(PORTF_PORT_vect)
{

  // my isr code here
}

Hint: post a complete example that exhibits the problem.

tried removing all the variables, finally found that removing the "softwareserial.h" header file and the code compiled good.

Thanks for the hint.

Do you really need SoftwareSerial? Pins 0 and 1 are Serial1 and independent of the USB communucation. And there are more UARTs on the 4809, just do a search how to access them.

The warning from the compiler is clear: multiple definition of…
Apparently that vector was used by a #include file. The solution to that is either dump the #include file or choose other inputs.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.