These instructions explain how to build ArduPilot on board the Erle-Brain 2.
Connection and setup
Give Erle-Brain Internet access by plugging the Ethernet wire into the RJ-45 connector.
Connect to Erle-Brain 2:
$ ssh erle@erle-brain-2.local
Clone the source:
#Move to home cd ~/ #Clone the repository in home git clone https://github.com/erlerobot/ardupilot.git
Build
Build for Copter:
cd /home/erle/ardupilot/ArduCopter make erlebrain2 -j4
This will build the firmware for a quadcopter. If you wish to build for another frame type (such as hexacopter) append “-hexa” onto the end of the make command (i.e. make erlebrain2-hexa -j4). The full list of available frames can be found in thetargets.mk file.
Move firmware to the executable directory
When you compile Copter (in ~/ardupilot/ArduCopter) the executableArduCopter.elf is created in the same folder. You need to move the executable to home (`~/`or `/home/erle/`) because there is a service in Erle-Brain 2 (calledapm.service) which automatically launches the autopilot from those locations.
#Assuming present working directory is: ~/ardupilot/ArduCopter sudo cp ArduCopter.elf ~/
You can find additional information about the default launch process and launch configuration options at this link
systemctl stop apm.service
Now copy the executable in home (`~`or `/home/erle/`) and restart the service in order to execute the new executable:
systemctl start apm.service
Or simply, restart the board once you have copied the new executable
Building for Erle-Brain
These instructions explain how to build ArduPilot on the Erle-Brain board.
Connection and setup
Connect to Erle-Brain using microUSB:
sudo ifconfig eth6 192.168.7.1
ssh root@192.168.7.2
Give Erle-Brain Internet access connecting Ethernet wire into RJ45 connector and configure the interface:
$ sudo ifconfig eth0 up
$ sudo dhclient eth0
#Check if Erle BRain has Internet access
$ ping www.google.es
# press |ctrl| |c| to exit
Clone the source:
cd git clone https://github.com/erlerobot/ardupilot.git
Build
Build for Copter:
cd /home/pi/ardupilot/ArduCopter make pxf -j4
This will build the firmware for a quadcopter. If you wish to build for another frame type (such as hexacopter) append “-hexa” onto the end of the make command (i.e. make -j4 pxf-hexa). The full list of available frames can be found in the targets.mk file.
Move firmware to the executable directory
Move the executable to the directory from where it is normally started:
sudo cp ArduCopter.elf /~
systemctl stop apm-copter.service