forked from arktools/ardupilotone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
202 lines (144 loc) · 8.21 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
Building using arduino
--------------------------
To install the libraries:
- copy Library Directories to your \arduino\hardware\libraries\ or arduino\libraries directory
- Restart arduino IDE
* Each library comes with a simple example. You can find the examples in menu File->Examples
Building using make
-----------------------------------------------
- go to directory of sketch and type "make".
--type "make upload" to upload according to the parameters in config.mk .
Building using cmake
-----------------------------------------------
- mkdir build
- cd build
- cmake .. -DBOARD=mega -DPORT=/dev/ttyUSB0
You can select from mega/mega2560.
If you have arduino installed in a non-standard location you by specify it by using:
-DARDUINO_SDK_PATH=/path/to/arduino ..
- make (will build every sketch)
- make ArduPlane (will build just ArduPlane etc.)
- make ArduPloat-upload (will upload the sketch)
If you have a sync error during upload reset the board/power cycle the board
before the upload starts.
Building using eclipse
-----------------------------------------------
Getting the Source:
assuming source located here: /home/name/apm-src
You can either download it or grab it from git:
git clone https://code.google.com/p/ardupilot-mega/ /home/name/apm-src
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 ../apm-src -D BOARD=mega -D PORT=/dev/ttyUSB0
Note: Unix can be substituted for MinGW/ MSYS/ NMake (for windows)
(see http://www.vtk.org/Wiki/Eclipse_CDT4_Generator)
input options:
CMAKE_BUILD_TYPE choose from DEBUG, RELEASE etc.
PORT is the port for uploading to the board, COM0 etc on windows. /dev/ttyUSB0 etc. on linux
BOARD is your board type, mega for the 1280 or mega2560 for the 2560 boards.
ARDUINO_SDK_PATH if it is not in default path can specify as /path/to/arduino
Importing the Eclipse Build Project:
Import project using Menu File->Import
Select General->Existing projects into workspace:
Browse where your build tree is and select the root build tree directory.
Keep "Copy projects into workspace" unchecked.
You get a fully functional eclipse project
Importing the Eclipse Source Project:
You can also import the source repository (/home/name/apm-src) if you want to modify the source/ commit using git.
Settings up Eclipse to Recognize PDE files:
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
Advanced:
* Regenerating the eclipse source project file:
cmake -G"Eclipse CDT4 - Unix Makefiles" -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE /home/name/apm-src
Build a package using cpack
-----------------------------------------------
- cd build
- cmake ..
- make package
- make package_source
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ Installation and Building on a Mac
@@
@@
@@ Modified from README.txt by James Goppert [email protected]
@@ By: Nathanael Xie Wenyao [email protected] Dec 13 2011
Install Procedure:
1. Install MacPorts
2. Install Cmake via MacPorts
3. Install Arduino IDE (only versions 0022 and 0023 currently supported)
4. Build using Cmake
Installing MacPorts
-----------------------------------------------
- Ensure you have the following 2 pre-requisites for MacPorts:
1. Apple's Xcode Developer Tools (version 4.1 or later for Lion, 3.2 or later for Snow Leopard, or 3.1 or later for Leopard), found at the Apple Developer Connection site, on your Mac OS X installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended. Ensure that the optional components for command line development are installed ("UNIX Development", plus "System Tools" in newer versions, or "Command Line Support" in older ones).
2. The X11 windowing environment (A.K.A. “X11 User”) for ports that depend on the functionality it provides to run.
The “X11 User” package is an optional installation on your system CDs/DVD for Tiger, enabled through the “Customize” button of the installer, whereas it is included by default on Leopard and newer.
You can use the xorg-server port instead of Apple's X11.app if you wish.
- Go to: http://www.macports.org/install.php
- Download the .pkg for your OS and install it
Installing Cmake via MacPorts
-----------------------------------------------
- Open Terminal.app (Applications > Utilities > Terminal)
- sudo port install cmake
- sudo port build cmake
Installing Arduino IDE
-----------------------------------------------
- Go to: http://arduino.cc/en/Main/Software
- Download the desired Arduino version (0022 or 0023)
- Drag the Arduino.app into the Applications folder on your computer
Building using cmake
-----------------------------------------------
Within your ardupilotone directory, execute the following in Terminal.app:
- mkdir build
- cd build
- cmake .. -DBOARD=mega -DPORT=/dev/ttyUSB0 -DARDUINO_SDK_PATH=/Applications/Arduino.app/Contents/Resources/Java/
Note: Boards that can be selected are mega/mega2560
Then choose from the following options from within the build directory:
- make (will build every sketch)
- make ArduPlane (will build just ArduPlane etc.)
- make ArduPlane-upload (will upload the sketch)
If you have a sync error during upload reset the board/power cycle the board
before the upload starts.
OPTIONAL: This is provided for those who want to build from the Eclipse IDE
Building using eclipse
-----------------------------------------------
Getting the Source:
assuming source located here: /home/name/apm-src
You can either download it or grab it from git:
git clone https://code.google.com/p/ardupilot-mega/ /home/name/apm-src
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 ../apm-src -D BOARD=mega -D PORT=/dev/ttyUSB0
Note: Unix can be substituted for MinGW/ MSYS/ NMake (for windows)
(see http://www.vtk.org/Wiki/Eclipse_CDT4_Generator)
input options:
CMAKE_BUILD_TYPE choose from DEBUG, RELEASE etc.
PORT is the port for uploading to the board, COM0 etc on windows. /dev/ttyUSB0 etc. on linux
BOARD is your board type, mega for the 1280 or mega2560 for the 2560 boards.
ARDUINO_SDK_PATH if it is not in default path can specify as /path/to/arduino
Importing the Eclipse Build Project:
Import project using Menu File->Import
Select General->Existing projects into workspace:
Browse where your build tree is and select the root build tree directory.
Keep "Copy projects into workspace" unchecked.
You get a fully functional eclipse project
Importing the Eclipse Source Project:
You can also import the source repository (/home/name/apm-src) if you want to modify the source/ commit using git.
Settings up Eclipse to Recognize PDE files:
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
Advanced:
* Regenerating the eclipse source project file:
cmake -G"Eclipse CDT4 - Unix Makefiles" -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE /home/name/apm-src
vim:ts=4:sw=4:expandtab