Building for Erle-Brain 2



Building for Erle-Brain 2

Content (Show)
  • Connection and setup
  • Build
  • Move firmware to the executable directory

These instructions explain how to build ArduPilot on board the Erle-Brain 2.

Note:
Alternatively you can follow Erle-Robotics’s instructions on how to build from source on your PC.

Contents [hide]

  • 1 Connection and setup
  • 2 Build
  • 3 Move firmware to the executable directory

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 
Tip:
More info about connection methods in manufacturers documentation

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.

Note:
If building for Plane, Rover or Antenna Tracker replace the above “ArduCopter” with “ArduPlane”, “APMrover2” or “AntennaTracker”.

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 ~/
Tip:
The service mentioned above, launches ArduCopter by default, using a bridge for sending telemetry data and GPS placed in ttyAMA0 by default
 
You can find additional information about the default launch process and launch configuration options at this link
Tip:
If you are unable to copy the executable it may be because the destination file is locked. This is because the autopilot is already running.  Use the following command to stop the running service:

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


Content (Show)
  • Connection and setup
  • Build
  • Move firmware to the executable directory
Warning:
This page is under construction.

These instructions explain how to build ArduPilot on the Erle-Brain board.

Tip:
Alternatively you can follow Erle-Robotics’s instructions on how to build from source found here.

Contents [hide]

  • 1 Connection and setup
  • 2 Build
  • 3 Move firmware to the executable directory

Connection and setup

Connect to Erle-Brain using microUSB:

sudo ifconfig eth6 192.168.7.1 
ssh root@192.168.7.2
Tip:
Check the interface Erle-Brain creates using ifconfig command. More info about how to connect in manufacturers documentation

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
Tip:
More info about in manufacturers documentation

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.

Note:
If building for Plane, Rover or Antenna Tracker replace the above “ArduCopter” with “ArduPlane”, “APMrover2” or “AntennaTracker”.

Move firmware to the executable directory

Move the executable to the directory from where it is normally started:

sudo cp ArduCopter.elf /~
Tip:
If you are unable to copy the executable it may be because the destination file is locked because it is already running.  Use the following command to stop the running service

systemctl stop apm-copter.service

Tip:
If you wish to configure the launch of APM, please check this link


你可能感兴趣的:(Building for Erle-Brain 2)