For a project I am dependend on a certain libary. This library needs to do something with the serial interrupt which is fine. I tested the library and what it is supposed to do, functions perfectly fine.
But than I included <SD.h> and than this happened.
HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':
(.text+0x0): multiple definition of `__vector_18'
I know precisely what is going on. These lines of my custom library
#elif defined(SERIAL_PORT_0)
ISR(USART_RX_vect) {
XpressNetClass::handle_interrupt(); //weiterreichen an die Funktion
}
conflicts with the Sd.h library.
Now I looked into the SD library to see if I can 'remove' any conflicting code but I cannot find. I looked into several header files which were mention in the sd library.. but it is such a web I got lost.
So I have 2 questions: Is this actually fixable? I need to use both SD and SPI library and the my custom library needs to do it's thing as well.
The SD library uses Serial for debugging, which is causing the Serial library code to be included in the sketch, conflicting with your usage of the serial interrupt.
Had a quick look at the SD library files, there is also some use of Serial in the library functions, so you will need to go through all the .cpp files in the src and utility directories and comment out the references to Serial.
I found that link before. But at the time it did not get me anywhere however. It did make look harder now. I searched the entire SD folder for Serial.
Inside SdFile.cpp there were several Serial.print's 'hidden' inside a function. After commenting these out I can compile again. Now the SD module also compiles I have a slight 113% ram usage issue. But that I can solve.