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

Gremsy liked Gremsy's profile
Mar 12
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…