compilation errors.

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

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)

  • 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.

    • For Arducopter version 2.9.1 and earlier you should select the “None” from this menu and then ensure that under Tools, Board is “ArduinoMega 2560 or Mega ADK”. If you are using an APM2 you will also need to uncomment line 5 from APM_Config.h (see bottom screenshot)
    • For versions later than 2.9.1 you should set the “ArduPilot”, “HAL Board” to either “ArduPilot Mega 1″ or “ArduPilot Mega 2.x” depending on which board you are programming.

    Note: you will need to restart your Arduino IDE after changing the above

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…