hi every one,
i tried to compile the arducopter code in arduino but i am getting the following errors in libraries. can anyone suggest me something?
In file included from C:\Users\Rabia\Documents\Arduino\libraries\AP_Semaphore/AP_Semaphore.h:9,
from C:\Users\Rabia\Documents\Arduino\libraries\DataFlash/DataFlash_APM1.h:7,
from C:\Users\Rabia\Documents\Arduino\libraries\DataFlash/DataFlash.h:94,
from C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:13,
from C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:20:
C:\Users\Rabia\Documents\Arduino\libraries\FastSerial/FastSerial.h:47:3: error: #error Must include FastSerial.h before the Arduino serial driver is defined.
In file included from C:\Users\Rabia\Documents\Arduino\libraries\AP_Semaphore/AP_Semaphore.h:9,
from C:\Users\Rabia\Documents\Arduino\libraries\DataFlash/DataFlash_APM1.h:7,
from C:\Users\Rabia\Documents\Arduino\libraries\DataFlash/DataFlash.h:94,
from C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:13,
from C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:20:
C:\Users\Rabia\Documents\Arduino\libraries\FastSerial/FastSerial.h:95: error: conflicting declaration 'FastSerial Serial'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/HardwareSerial.h:98: error: 'Serial' has a previous declaration as 'HardwareSerial Serial'
C:\Users\Rabia\Documents\Arduino\libraries\FastSerial/FastSerial.h:96: error: conflicting declaration 'FastSerial Serial1'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/HardwareSerial.h:104: error: 'Serial1' has a previous declaration as 'HardwareSerial Serial1'
C:\Users\Rabia\Documents\Arduino\libraries\FastSerial/FastSerial.h:97: error: conflicting declaration 'FastSerial Serial2'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/HardwareSerial.h:107: error: 'Serial2' has a previous declaration as 'HardwareSerial Serial2'
C:\Users\Rabia\Documents\Arduino\libraries\FastSerial/FastSerial.h:98: error: conflicting declaration 'FastSerial Serial3'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/HardwareSerial.h:110: error: 'Serial3' has a previous declaration as 'HardwareSerial Serial3'
In file included from C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:20:
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:79: error: 'AP_HAL' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:79: error: expected ',' or '...' before '*' token
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:106: error: 'gcs_severity' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:114: error: 'gcs_severity' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:125: error: 'AP_HAL' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:125: error: ISO C++ forbids declaration of 'UARTDriver' with no type
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:125: error: expected ';' before '*' token
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h: In member function 'void GCS_Class::init(int)':
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:80: error: '_port' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:80: error: 'port' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h: At global scope:
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:145: error: 'AP_HAL' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:145: error: expected ',' or '...' before '*' token
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:147: error: 'gcs_severity' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink/GCS.h:148: error: 'gcs_severity' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:22: error: 'AP_HAL' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:22: error: expected initializer before '&' token
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp: In constructor 'GCS_MAVLINK::GCS_MAVLINK()':
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:27: error: 'setup_object_defaults' is not a member of 'AP_Param'
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp: At global scope:
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:31: error: variable or field 'init' declared void
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:31: error: 'AP_HAL' has not been declared
C:\Program Files (x86)\Arduino\libraries\GCS_MAVLink\GCS_Common.cpp:31: error: 'port' was not declared in this scope
Replies
heloo,
Help me to resolve this problem. After compiling i am Getting the following message. I am using APM 2.6 and ArduPilot-Arduino-1.0.3-windows.
Building for ArduPilot Mega 2.x Excluding arduino core from include paths Excluding arduino core from link Binary sketch size: 294,264 bytes (of a 258,048 byte maximum) processing.app.debug.RunnerException: Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it. at processing.app.Sketch.size(Sketch.java:1658) at processing.app.Sketch.build(Sketch.java:1591) at processing.app.Sketch.build(Sketch.java:1567) at processing.app.Editor$DefaultRunHandler.run(Editor.java:1913) at java.lang.Thread.run(Thread.java:619)
You need to install gcc 4.8.2:
http://firmware.diydrones.com/Tools/Arduino/ArduPilot-Arduino-1.0.3...
http://dev.ardupilot.com/wiki/building-ardupilot-with-arduino-windows/
Step 4...
Hi Rabia, have you followed the instructions here:
http://dev.ardupilot.com/wiki/load-the-code-onto-apm2x/
Specifically:
Setting the board type
In our modified version of the Arduino IDE there is a new “ArduPilot” menu which allows you to select the board type.
Note: you will need to restart your Arduino IDE after changing the above
thanx for replying.
and i followed the following instructions while uploading the code in arduino.
currently i could not update from the normal arduino1.05r2 to arduino $(version)
http://copter.ardupilot.com/wiki/programming-arducopter-with-arduino/
https://code.google.com/p/arducopter/wiki/Code
i am compiling the code in the following version of arduino.
and i did uncomment the line in configuration file but still got no output.