Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Ardupilot
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Ardupilot
Commits
caf4a278
Commit
caf4a278
authored
12 years ago
by
Pat Hickey
Browse files
Options
Downloads
Patches
Plain Diff
README: rewritten to be up to date
parent
36cb7bad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+36
-116
36 additions, 116 deletions
README.md
with
36 additions
and
116 deletions
README.md
+
36
−
116
View file @
caf4a278
Getting the source
==================
# ArduPilot Project
We'll assume you are putting the source in
`/home/name/ardupilot`
.
## Getting the source
You can either download the source using the "ZIP" button at
https://github.com/diydrones/ardupilot, or you can grab it from github
using git:
You can either download the source using the "ZIP" button at the top of the
github page, or you can make a clone using git:
```
git clone git://github.com/diydrones/ardupilot.git
```
Building using Arduino
======================
## Building using Arduino IDE
First install the libraries:
ArduPilot is no longer compatible with the standard Arduino distribution.
You need to use a patched Arduino IDE to build ArduPilot.
1.
Copy the
`libraries`
directory to your
`/path/to/arduino/hardware/libraries/`
or
`/path/to/arduino/libraries`
directory.
1.
The patched ArduPilot Arduino IDE is available for Mac and Windows from
the
[
downloads page
][
1
]
. On Linux, you should use the makefile build.
2.
Restart the Arduino IDE.
2.
Unpack and launch the ArduPilot Arduino IDE. In the preferences menu, set
your sketchbook location to your downloaded or cloned
`ardupilot`
directory.
Each library comes with a simple example. You can find the examples in
the
menu File→Examples
3.
In the ArduPilot Arduino IDE, select your ArduPilot type (APM1 or APM2) from
the
ArduPilot menu (in the top menubar).
Building using make
===================
4.
Restart the ArduPilot Arduino IDE. You should now be able to build ArduPlane
or ArduCopter from source.
1.
Go to the directory of the sketch and type
`make`
.
5.
Remember that, after changing ArduPilot type (APM1 or APM2) in the IDE,
you'll need to close and restart the IDE before continuing.
2.
Type
`make upload`
to upload according to the parameters in
`config.mk`
.
[
1
]:
http://code.google.com/p/ardupilot-mega/downloads/list
For example:
```
cd ArduPlane # or ArduCopter etc.
make
make upload
```
Building using cmake
====================
```
cd ArduPlane # or ArduCopter etc.
mkdir build
cd build
# If you have Arduino installed in a non-standard location you by
# specify it by using -DARDUINO_SDK_PATH=/path/to/arduino
cmake .. -DAPM_BOARD=mega -DAPM_PORT=/dev/ttyUSB0 # Or -DAPM_BOARD=mega2560
make # Will build the sketch.
make ArduPlane-upload # Will upload the sketch.
```
If you have a sync error during upload, reset the board or power cycle
the board before the upload starts.
Building using Eclipse
======================
Generating the Eclipse project for your system
----------------------------------------------
```
mkdir /home/name/apm-build
cd /home/name/apm-build
cmake -G"Eclipse CDT4 - Unix Makefiles" \
-D CMAKE_BUILD_TYPE=Debug \
-D BOARD=mega \
-D PORT=/dev/ttyUSB0 \
../ardupilot/ArduCopter
```
## Building using make
Change the
`../ardupilot/ArduCopter`
above to be whatever sketch you
want to build.
1.
Before you build the project for the first time, you'll need to run
`make configure`
from a sketch directory. This will create a
`config.mk`
file at the top level of the repository. You can set some defaults in
`config.mk`
_Note: Unix can be substituted for MinGW/MSYS/NMake (for Windows).
See http://www.vtk.org/Wiki/Eclipse_CDT4_Generator)._
2.
In the sketch directory, type
`make`
to build for APM2. Alternatively,
`make apm1`
will build for the APM1.
### Define options
3.
Type
`make upload`
to upload. You may need to set the correct default
serial port in your
`config.mk`
.
*
`CMAKE_BUILD_TYPE`
choose from
`DEBUG`
,
`RELEASE`
etc.
# User Technical Support
*
`PORT`
is the port for uploading to the board,
`COM0`
etc. on
Windows,
`/dev/ttyUSB0`
etc. on Linux.
ArduPilot users should use the DIYDrones.com forums for technical support.
*
`BOARD`
is your board type,
`mega`
for the 1280 or
`mega2560`
for
the 2560 boards.
# Development Team
*
`ARDUINO_SDK_PATH`
to specify the path to your Arduino installation
if it isn't in the default path.
Importing the Eclipse build project
-----------------------------------
The ArduPilot project is open source and maintained by a team of volunteers.
1.
Import project using Menu File→Import.
To contribute, you can send a pull request on Github. You can also join the
[
development discussion on Google Groups
][
2
]
. Note that the Google Groups
mailing lists are NOT for user tech support, and are moderated for new users to
prevent off-topic discussion.
2.
Select General→Existing projects into workspace.
3.
Browse to where your build tree is and select the root build tree
directory.
4.
Keep "Copy projects into workspace" unchecked.
You should now have a fully functional eclipse project.
Importing the Eclipse source project
------------------------------------
You can also import the source repository (
`/home/name/ardupilot`
) if you
want to modify the source/commit using git.
Configuring Eclipse to recognize PDE files
------------------------------------------
*
File association: Go to Window→Preferences→General→Content
Types. This tree associates a filename or filename pattern with its
content type so that tools can treat it properly. Source and header
files for most languages are under the Text tree. Add "
*
.pde" as a
C++ Source.
*
Autocompletion: Right click on source project→Properties→Project
References→apm-build Project
*
Regenerating the Eclipse source project file:
`cmake -G"Eclipse
CDT4 - Unix Makefiles" -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE
/home/name/ardupilot`
Build a package using cpack
===========================
```
cd build
cmake ..
make package
make package_source
```
[
2
]:
https://groups.google.com/forum/?fromgroups#!forum/drones-discuss
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment