There is now a prebuild image which make things easier.
The image includes:
- Debian 8 jessie
- GCC 4.9
- Kernel 4.0.8 PREEMPT RT
- Devicetree for the BBBMINI is already loaded at startup.
-
Download Debian image here: bone-debian-8.1-console-armhf-2015-06-11-2gb.img.xz
-
Decompress image:
unxz one-debian-8.1-console-armhf-2015-06-11-2gb.img.xz
-
Copy image to microSDcard (>= 4GB):
sudo dd if=./one-debian-8.1-console-armhf-2015-06-11-2gb.img of=/dev/sdX
/dev/sdX should point to your microSDcard, be careful here!!! Uselsblk
to figure out, which is your mircroSDcard. -
sync
and remove mircroSDcard -
Put microSDcard into BBB
-
Connect BBB to power
-
Connect to the BBB
ssh debian@arm
-
Password
temppwd
-
Update software:
sudo apt-get update
-
Update software:
sudo apt-get upgrade
-
Install Kernel:
sudo apt-get install linux-image-4.0.8-bone-rt-r8 linux-firmware-image-4.0.8-bone-rt-r8
-
Add BBBMINI DTB:
sudo sed -i 's/#dtb=$/dtb=am335x-boneblack-bbbmini.dtb/' /boot/uEnv.txt
-
Install software:
sudo apt-get install g++ gawk git make ti-pru-cgt-installer device-tree-compiler
-
Uninstall Apache2:
sudo apt-get remove apache2
-
Reboot system:
sudo reboot
-
Login again
-
Get Ardupilot code:
git clone https://github.com/diydrones/ardupilot.git
-
Change dir:
cd ardupilot/Tools/Linux_HAL_Essentials/pru/rangefinderpru
-
Build Rangefinder firmware:
make
-
Install Rangefinder firmware:
sudo make install
cd ardupilot/ArduCopter
for ArduCopter
or
cd ardupilot/ArduPlane
for ArduPlane
or
cd ardupilot/APMrover2
for APMRover
then
make bbbmini
To compile ArduPilot for the BBB on a Ubuntu computer the following packages are required:
sudo apt-get install git gawk g++-arm-linux-gnueabihf
Now get the source code:
git clone https://github.com/diydrones/ardupilot.git
choose what to build:
cd ardupilot/ArduCopter
for ArduCopter
or
cd ardupilot/ArduPlane
for ArduPlane
or
cd ardupilot/APMrover2
for APMRover
then
make bbbmini
use scp
to copy the .ELF executable to the BBB.
Now you can check your hardware here.
then you can start ArduPilot:
sudo ardupilot/ArduCopter/ArduCopter.elf
or
sudo ardupilot/ArduPlan/ArduPlan.elf
or
sudo ardupilot/APMrover2/APMrover2.elf
To connect a MAVLink groundstation add -A udp:192.168.178.26:14550
To use MAVLink via radio connected to UART4 add -C /dev/ttyO4
.
If there is a GPS connected to UART5 add -B /dev/ttyO5
.
Example: MAVLink groundstation with IP 192.168.178.26 on port 14550 and GPS connected to /dev/ttyO5
UART5.
sudo ardupilot/ArduCopter/ArduCopter.elf -A udp:192.168.178.26:14550 -B /dev/ttyO5
Example: MAVLink groundstation via radio connected to UART4 and GPS connected to /dev/ttyO5
UART5.
sudo ardupilot/ArduCopter/ArduCopter.elf -B /dev/ttyO5 -C /dev/ttyO4