I’m new to the AdruPilot world so please forgive me if this isn’t the proper place to post this. I’ve tried to look for answers in the developers pages but just can’t find the answer to my predicament.
I’m running Windows 10 and trying to use the Eclipse IDE to compile the code.
These are the steps I used in trying to get Eclipse to compile the code:
Followed the instructions in "Building ArduPilot for Pixhawk/PX4 on Windows with Make" (http://ardupilot.org/dev/docs/building-px4-with-make.html).
Then ran the git command: git config --global core.autocrlf false
Cloned the ardupilot repository to my PC
Initialized and updated the submodules: git submodule update --init --recursive
Downloaded and installed the PX4 toolchain by running the pixhawk_toolchain_installer_latest.exe
Renamed /ardupilot/eclipse.cproject to .cproject and /ardupilot/eclipse.project to .project
Imported the project into the workspace: Select File | Import | General | Existing Projects into Workspace
When I try to build the code I get multiple errors. For example the IDE is showing that the FlightMode enums are undefined. I’ve added “c:\users\richard\documents\github\ardupilot\libraries” to the includes path in Properties|C/C++ General|Paths and Symbols|Includes. I can make the firmware if I use the px4-v2 in the Make Command tab or Project|Make Target|Build so I know that at least I’ve got something setup correctly.
Is it possible to get the Eclipse IDE to display the code without flagging multiple errors? . Any help is greatly appreciated.
There isn’t much people in the dev team using Eclipse (or any IDE) so it might be hard to help. I don’t know the Eclipse configurations, but it not knowing FlightMode looks like it doesn’t include headers of the same directory - so you may need to include the vehicle directories too.
@rmackay9 Do you have your Eclipse without errors?
Thanks for the reply. I was hoping for better news regarding the workflow. Since there are instructions to use Eclipse on your site I figured that that would be the best way for my to start down this path. I’ve been developing code for medical devices and it’s been nice doing all of our work in a single IDE window (Keil IDE).
Pardon my ignorance, but I guess you are writing the code with a text editor then call the compiler and if there are errors, then you use the gdb debugger? Is that the process?
I don’t do much coding, but yes, that’s the general process most developers do, together with adding MAVLink messages and logging debug information while running SITL.
Hi I have been using Eclipse for a few weeks to work on Arduplane, It seems to work OK. It used to flag up the FlightMode enums as ambiguous, this was because they were defined in AntennaTracker and APM2Rover as well as Arduplane, I just moved these 2 directories out of the search path and the problem went away.
regards
Mike