Go Down

Topic: An alternative Serial Library for Arduino 1.0 (Read 23 times) previous topic - next topic

fat16lib

I have posted a fast serial data logger that can log sustained serial data to an SD card at 57,600 baud on a 328 Arduino and 115,200 baud on a Mega. 

For details see this post http://arduino.cc/forum/index.php/topic,86300.0.html

skyjumper

Hi All...

I am trying to use this library in a large application, and when I link it I get the errors pasted below. I have removed all places where the HardwareSerial.h library exists, and removed all Serial1 and Serial calls. I can build the samples. I realize the cause is because the compiler must be finding the original Serial library somewhere, but how to find it? Any hints?

Thanks...

-LC:\Users\jim\AppData\Local\Temp\build2981441506981796786.tmp -lm
core.a(HardwareSerial.cpp.o): In function `__vector_20':
C:\Users\jim\Desktop\arduino-1.0\hardware\maniacbug-mighty-1284p-8f335f8\cores\standard/HardwareSerial.cpp:106: multiple definition of `__vector_20'
SerialPort\SerialPort.cpp.o:C:\Users\jim\Desktop\arduino-1.0\libraries\SerialPort/SerialPort.cpp:198: first defined here
core.a(HardwareSerial.cpp.o): In function `__vector_28':
C:\Users\jim\Desktop\arduino-1.0\hardware\maniacbug-mighty-1284p-8f335f8\cores\standard/HardwareSerial.cpp:127: multiple definition of `__vector_28'
SerialPort\SerialPort.cpp.o:C:\Users\jim\Desktop\arduino-1.0\libraries\SerialPort/SerialPort.cpp:207: first defined here
core.a(HardwareSerial.cpp.o): In function `__vector_21':
C:\Users\jim\Desktop\arduino-1.0\hardware\maniacbug-mighty-1284p-8f335f8\cores\standard/HardwareSerial.cpp:190: multiple definition of `__vector_21'
SerialPort\SerialPort.cpp.o:C:\Users\jim\Desktop\arduino-1.0\libraries\SerialPort/SerialPort.cpp:243: first defined here
core.a(HardwareSerial.cpp.o): In function `__vector_29':
C:\Users\jim\Desktop\arduino-1.0\hardware\maniacbug-mighty-1284p-8f335f8\cores\standard/HardwareSerial.cpp:221: multiple definition of `__vector_29'
SerialPort\SerialPort.cpp.o:C:\Users\jim\Desktop\arduino-1.0\libraries\SerialPort/SerialPort.cpp:252: first defined here

maniacbug

#77
Feb 18, 2012, 07:20 am Last Edit: Feb 18, 2012, 07:22 am by maniacbug Reason: 1
Interesting, I see it's not working out of the box with maniacbug-mighty-1284p  :smiley-mr-green:

__vector_20 is USART0_RX_vect.  The 1284P defines the USART0 vectors, HardwareSerial picks them up.  Shouldn't this also have the same problem on a Mega?

Looks like this library is demanding access to the USART0_RX_vect?

skyjumper


Interesting, I see it's not working out of the box with maniacbug-mighty-1284p  :smiley-mr-green:

__vector_20 is USART0_RX_vect.  The 1284P defines the USART0 vectors, HardwareSerial picks them up.  Shouldn't this also have the same problem on a Mega?

Looks like this library is demanding access to the USART0_RX_vect?


Oh? I was able to build a few of the examples that came with this library using your cores. I had suspected it was a core issue, but after I was able to build the examples I assumed it must be my code.

If I remove the HardwareSerial.cpp file, then the compilation fails. Its getting dragged in somewhere.

maniacbug

Hmm, I mis-spoke.  As you say, examples compile fine on mighty-1284p.

What's happening is that the LINKER wants to include these symbols from HardwareSerial.  There's no avoiding the compiler picking them up.

It would be interesting to see the errors you get when removing HardwareSerial.cpp.

Go Up