Install binaries

The recommended way to install any vehicle is the following (after frambuesa release):

Connect your Raspberry Pi Zero to internet, open one terminal and execute the following commands:

sudo apt-get update
sudo apt-get install apm-copter-erlebrain

Open a terminal and type the following:

sudo apt-get purge -y apm-copter-erlebrain

Note: Before install a new package, uninstall the previous package.

  • apm-copter-erlebrain
  • apm-hexa-erlebrain
  • apm-heli-erlebrain
  • apm-tri-erlebrain
  • apm-octa-erlebrain
  • apm-rover-erlebrain
  • apm-plane-erlebrain

sudo pip install future
sudo apt-get install -y pkg-config-arm-linux-gnueabihf
git clone https://github.com/ardupilot/ardupilot
cd ardupilot/
git submodule update --init
./waf configure --board=erlebrain2
./waf # to compile the code for all the vehicles

If only one of the vehicles is needed:

./waf --targets bin/arducopter-quad # coax heli hexa octa ...

binaries will be located under build/erlebrain2/bin.

sudo pip install future
git clone https://github.com/ardupilot/ardupilot
cd ardupilot/
git submodule update --init

Change this line.

class erlebrain2(linux):
    toolchain = 'native' # Necessary change

    def configure_env(self, cfg, env):
        super(erlebrain2, self).configure_env(cfg, env)

        env.DEFINES.update(
            CONFIG_HAL_BOARD_SUBTYPE = 'HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2',
        )
./waf configure --board=erlebrain2
./waf # to compile the code for all the vehicles

# install git
sudo apt-get install git
# clone ardupilot repository
git clone https://github.com/ArduPilot/ardupilot
# run prerequisites
ardupilot/Tools/scripts/install-prereqs-ubuntu.sh -y
# Change directory to ardupilot
cd ardupilot
# Pick your vehicle, we'll choose ArduCopter
cd ArduCopter
# clean previous builds (if existing)
make clean
# -j4 sets the number of cores will be used during the build process.
make erlebrain2 -j4
# Form build a Erle-HexaCopter:
# make erlebrain2-hexa -j4

Once the binary is generated will be saved into /tmp/ArduCopter.build/ArduCopter.elf



You can find the source of the code in the following link.

You can download the latest binary file from http://firmware.ardupilot.org/

  • Erle-Copter: http://firmware.ardupilot.org/Copter/latest/erlebrain2-quad/
  • Erle-HexaCopter: http://firmware.ardupilot.org/Copter/latest/erlebrain2-hexa/
  • Erle-Rover: http://firmware.ardupilot.org/Rover/latest/erlebrain2/
  • Erle-Plane: http://firmware.ardupilot.org/Plane/latest/erlebrain2/

You need to copy the new binary file to the Erle-Brain 2 via ssh.

Remember: If you are using a PXFmini with a Raspberry Pi Zero the binary files loaded by default are inside ~/PXFmini/ folder

# set a new name to the recently created binary
# or before copying the new one rename one located in the brain
ssh erle@10.0.0.1
    mv ArduCopter.elf ArduCopter.elf.old
    sudo systemctl stop apm.service
    exit

scp /tmp/ArduCopter.build/ArduCopter.elf erle@10.0.0.1:~/ArduCopter.elf

ssh erle@10.0.0.1
    # launch manually binary file Ctrl+C to close
    sudo ./ArduCopter.elf
    # start apm.service
    sudo systemctl start apm.service
    exit