You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: de/dev_setup/building_px4.md
+7-197Lines changed: 7 additions & 197 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,26 +60,19 @@ make px4_sitl gazebo
60
60
61
61
To build for NuttX- or Pixhawk- based boards, navigate into the **PX4-Autopilot** directory and then call `make` with the build target for your board.
62
62
63
-
For example, to build for *Pixracer*you would use the following command:
63
+
For example, to build for [Pixhawk 4](../flight_controller/pixhawk4.md) hardware you could use the following command:
64
64
```sh
65
65
cd PX4-Autopilot
66
66
make px4_fmu-v4_default
67
67
```
68
68
69
-
:::note
70
-
In the example above the first part of the build target `px4_fmu-v4` is the firmware for a particular flight controller hardware and `default` is the configuration name (in this case the "default" configuration). The `default` is optional so you could instead do:
71
-
```
72
-
make px4_fmu-v4
73
-
```
74
-
:::
75
-
76
69
A successful run will end with similar output to:
77
70
```sh
78
71
-- Build files have been written to: /home/youruser/src/PX4-Autopilot/build/px4_fmu-v4_default
Build instructions are given in the documentation for the individual [flight controller boards](../flight_controller/README.md). The following list shows the build commands for just the [Pixhawk standard](../flight_controller/autopilot_pixhawk_standard.md) boards:
75
+
The first part of the build target `px4_fmu-v4` indicates the firmware for a particular flight controller hardware. The following list shows the build commands for the [Pixhawk standard](../flight_controller/autopilot_pixhawk_standard.md) boards:
@@ -96,10 +89,13 @@ Build instructions are given in the documentation for the individual [flight con
96
89
:::
97
90
* Pixhawk 1 with 2 MB flash: `make px4_fmu-v3_default`
98
91
92
+
Build commands for non-Pixhawk NuttX fight controllers (and for all other-boards) are provided in the documentation for the individual [flight controller boards](../flight_controller/README.md).
93
+
99
94
:::note
100
-
Generally the `_default` suffix is optional (i.e. you can also build using `make px4_fmu-v4`, `make bitcraze_crazyflie`, etc.).
95
+
The `_default` suffix is the firmware _configuration_. This is optional (i.e. you can also build using `make px4_fmu-v4`, `make bitcraze_crazyflie`, etc.).
101
96
:::
102
97
98
+
103
99
### Uploading Firmware (Flashing the board)
104
100
105
101
Append `upload` to the make commands to upload the compiled binary to the autopilot hardware via USB. For example
@@ -121,194 +117,8 @@ Rebooting.
121
117
122
118
## Other Boards
123
119
124
-
The following boards have more complicated build and/or deployment instructions.
125
-
126
-
### Raspberry Pi 2/3 Boards
127
-
128
-
The command below builds the target for [Raspberry Pi 2/3 Navio2](../flight_controller/raspberry_pi_navio2.md).
129
-
130
-
#### Cross-compiler Build
131
-
132
-
Set the IP (or hostname) of your RPi using:
133
-
134
-
```sh
135
-
export AUTOPILOT_HOST=192.168.X.X
136
-
```
137
-
or
138
-
```sh
139
-
export AUTOPILOT_HOST=pi_hostname.domain
140
-
```
141
-
142
-
143
-
:::note
144
-
The value of the environment variable should be set before the build, or `make upload` will fail to find your RPi.
145
-
:::
146
-
147
-
Build the executable file:
148
-
149
-
```sh
150
-
cd PX4-Autopilot
151
-
make emlid_navio2 # for cross-compiler build
152
-
```
153
-
154
-
The "px4" executable file is in the directory **build/emlid_navio2_default/**. Make sure you can connect to your RPi over ssh, see [instructions how to access your RPi](../flight_controller/raspberry_pi_navio2.md#developer-quick-start).
155
-
156
-
Then upload it with:
157
-
158
-
```sh
159
-
cd PX4-Autopilot
160
-
make emlid_navio2 upload # for cross-compiler build
161
-
```
162
-
163
-
Then, connect over ssh and run it with (as root):
164
-
165
-
```sh
166
-
cd~/px4
167
-
sudo ./bin/px4 -s px4.config
168
-
```
169
-
170
-
#### Native Build
171
-
172
-
If you're building *directly* on the Pi, you will want the native build target (emlid_navio2_native).
173
-
174
-
```sh
175
-
cd PX4-Autopilot
176
-
make emlid_navio2_native # for native build
177
-
```
178
-
179
-
The "px4" executable file is in the directory **build/emlid_navio2_native/**. Run it directly with:
A successful build followed by executing px4 will give you something like this:
186
-
187
-
```sh
188
-
189
-
______ __ __ ___
190
-
| ___ \ \ \ / / / |
191
-
||_/ / \ V / / /||
192
-
| __/ / \ / /_||
193
-
|| / /^\ \ \___ |
194
-
\_|\/\/|_/
195
-
196
-
px4 starting.
197
-
198
-
199
-
pxh>
200
-
```
201
-
202
-
#### Autostart
203
-
204
-
To autostart px4, add the following to the file **/etc/rc.local** (adjust it accordingly if you use native build), right before the `exit 0` line:
205
-
```sh
206
-
cd /home/pi && ./bin/px4 -d -s px4.config > px4.log
207
-
```
208
-
209
-
210
-
### OcPoC-Zynq Mini
120
+
Build commands for other boards are given the [board-specific flight controller pages](../flight_controller/README.md) (usually under a heading *Building Firmware*).
211
121
212
-
Build instructions for the [OcPoC-Zynq Mini](../flight_controller/ocpoc_zynq.md) are covered in:
213
-
*[Aerotenna OcPoC-Zynq Mini Flight Controller > Building PX4 for OcPoC-Zynq](../flight_controller/ocpoc_zynq.md#building-px4-for-ocpoc-zynq)
This section shows how to build for the [Qualcomm Snapdragon Flight](../flight_controller/snapdragon_flight.md).
220
-
221
-
#### Build
222
-
223
-
:::note
224
-
If you use the [Qualcomm ESC board](http://shop.intrinsyc.com/products/qualcomm-electronic-speed-control-board) (UART-based), then please follow their instructions [here](https://github.com/ATLFlight/ATLFlightDocs/blob/master/PX4.md). If you use normal PWM-based ESCs boards, then you may continue to follow the instructions on this page.
225
-
:::
226
-
227
-
The commands below build the targets for the Linux and the DSP side. Both executables communicate via [muORB](../middleware/uorb.md).
228
-
229
-
```sh
230
-
cd PX4-Autopilot
231
-
make atlflight_eagle_default
232
-
```
233
-
234
-
To load the SW on the device, connect via USB cable and make sure the device is booted. Run this in a new terminal window:
235
-
236
-
```sh
237
-
adb shell
238
-
```
239
-
240
-
Go back to previous terminal and upload:
241
-
242
-
```sh
243
-
make atlflight_eagle_default upload
244
-
```
245
-
246
-
Note that this will also copy (and overwrite) the two config files [mainapp.config](https://github.com/PX4/PX4-Autopilot/blob/master/posix-configs/eagle/flight/mainapp.config) and [px4.config](https://github.com/PX4/PX4-Autopilot/blob/master/posix-configs/eagle/flight/px4.config) to the device. Those files are stored under /usr/share/data/adsp/px4.config and /home/linaro/mainapp.config respectively if you want to edit the startup scripts directly on your vehicle.
Note: alternatively, especially on Mac, you can also use [nano-dm](https://github.com/kevinmehall/nano-dm).
263
-
264
-
Go back to ADB shell and run px4:
265
-
266
-
```sh
267
-
cd /home/linaro
268
-
./px4 -s mainapp.config
269
-
```
270
-
271
-
Note that the px4 will stop as soon as you disconnect the USB cable (or if you ssh session is disconnected). To fly, you should make the px4 auto-start after boot.
272
-
273
-
#### Autostart
274
-
275
-
To run the px4 as soon as the Snapdragon has booted, you can add the startup to `rc.local`:
276
-
277
-
Either edit the file `/etc/rc.local` directly on the Snapdragon:
278
-
279
-
```sh
280
-
adb shell
281
-
vim /etc/rc.local
282
-
```
283
-
284
-
Or copy the file to your computer, edit it locally, and copy it back:
285
-
286
-
```sh
287
-
adb pull /etc/rc.local
288
-
gedit rc.local
289
-
adb push rc.local /etc/rc.local
290
-
```
291
-
292
-
For the auto-start, add the following line before `exit 0`:
For more information about PX4 project autopilot board support levels see: [px4.io/autopilots/](https://px4.io/autopilots/).
5
+
:::
6
+
7
+
This category is for discontinued autopilots and complete vehicles. These are *not supported* by the head revision of PX4 and are no longer no longer being manufactured.
0 commit comments