arktools / ardupilotone

A universal autopilot system for ArduPilotMega
https://github.com/arktools/ardupilotone/wiki
GNU General Public License v3.0
61 stars 20 forks source link

GPS Test Code And LCD #30

Open beschmid12 opened 12 years ago

beschmid12 commented 12 years ago

Does anyone know why I can't build a test program to read the GPS from the APM and output it to a LCD? The code will work fine if I compile for Serial0 and print the data, but if I try to build for outputting to a LCD, I get errors:

core.a(HardwareSerial.cpp.o): In function __vector_36': C:\cygwin\home\Ben\work\arduino-0023\hardware\arduino\cores\arduino/HardwareSerial.cpp:140: multiple definition of__vector_36' myAPM_App.cpp.o:C:\DOCUME~1\Ben\LOCALS~1\Temp\build1258663894708907404.tmp/myAPM_App.cpp:33: first defined here core.a(HardwareSerial.cpp.o): In function __vector_25': C:\cygwin\home\Ben\work\arduino-0023\hardware\arduino\cores\arduino/HardwareSerial.cpp:93: multiple definition ofSerial1' myAPM_App.cpp.o:(.bss.Serial1+0x0): first defined here c:/cygwin/home/ben/work/arduino-0023/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Warning: size of symbol `Serial1' changed from 18 in myAPM_App.cpp.o to 19 in core.a(HardwareSerial.cpp.o)

ghost commented 12 years ago

You can't use Serial and FastSerial in the same sketch. Pick one.

= Mike

On Mar 9, 2012, at 5:52 PM, beschmid12 wrote:

Does anyone know why I can't build a test program to read the GPS from the APM and output it to a LCD? The code will work fine if I compile for Serial0 and print the data, but if I try to build for outputting to a LCD, I get errors:

core.a(HardwareSerial.cpp.o): In function __vector_36': C:\cygwin\home\Ben\work\arduino-0023\hardware\arduino\cores\arduino/HardwareSerial.cpp:140: multiple definition of__vector_36' myAPM_App.cpp.o:C:\DOCUME~1\Ben\LOCALS~1\Temp\build1258663894708907404.tmp/myAPM_App.cpp:33: first defined here core.a(HardwareSerial.cpp.o): In function __vector_25': C:\cygwin\home\Ben\work\arduino-0023\hardware\arduino\cores\arduino/HardwareSerial.cpp:93: multiple definition ofSerial1' myAPM_App.cpp.o:(.bss.Serial1+0x0): first defined here c:/cygwin/home/ben/work/arduino-0023/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Warning: size of symbol `Serial1' changed from 18 in myAPM_App.cpp.o to 19 in core.a(HardwareSerial.cpp.o)


Reply to this email directly or view it on GitHub: https://github.com/arktools/ardupilotone/issues/30

beschmid12 commented 12 years ago

As far as I know, it's only using FastSerial. Why would pulling in the LCD code cause it to use the Serial driver? The LCD should only use the parallel I/O.

ghost commented 12 years ago

Don't look at me 8). There's no LCD driver in the APM repo that I know of, so I'm not even sure which "LCD" driver you're using.

= Mike

On Mar 10, 2012, at 3:10 PM, beschmid12 wrote:

As far as I know, it's only using FastSerial. Why would pulling in the LCD code cause it to use the Serial driver? The LCD should only use the parallel I/O.


Reply to this email directly or view it on GitHub: https://github.com/arktools/ardupilotone/issues/30#issuecomment-4435172

beschmid12 commented 12 years ago

I guess I'll rummage around a little. I'm using the standard LCD code that came with the Arduino compiler distribution. There's probably a header getting pulled in that's confusing things. It also seems to work OK with the test code I used for the compass. There must be an interaction when Serial1 gets set up for the GPS.

samacumen commented 11 years ago

Hi,

I am facing the same issue. core.a(HardwareSerial.cpp.o)* : In function `__vector_25'

Can you tell me the solution to this problem. Thanks a lot, my email is: shyambs85@gmail.com. Hope you do;)