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-pxfmini

Open a terminal and type the following:

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

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

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

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=pxfmini
./waf # to compile the code for all the vehicles

If only one type of vehicles is needed:

./waf configure --board=pxfmini
./waf --targets bin/arducopter

binaries will be located under build/pxfmini/bin.

./waf configure --board=pxfmini
./waf build --target examples/INS_generic # BARO_generic ...

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

Change this line.

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

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

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

If only one type of vehicles is needed:

./waf configure --board=pxfmini
./waf --targets bin/arducopter

./waf configure --board=pxfmini
./waf build --target examples/INS_generic # BARO_generic ...

If only one type of vehicles is needed:

./waf configure --board=pxfmini
./waf --targets bin/arducopter

To compile the APM for the Raspberry Pi Zero type the following in the command line of a Linux/Mac OS machine:

cd ~/
git clone https://github.com/raspberrypi/tools.git # Get cross compiler
git clone https://github.com/erlerobot/ardupilot.git # Fetch the flight stack sources

You need to know your development machine architecture. Use 'uname -a' to know it.
x86_64 means a 64 bits architecture.
x86_ i386, i486, i586 or i686 means a 32 bits architecture.

x86 (32bits):

export PATH=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH

x64 (64bits):

export PATH=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:$PATH

Then, compile the autopilot for the desired vehicle, e.g. for Copter:

cd ~/ardupilot/ArduCopter
make pxfmini -j4



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

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

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

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