Building Quadshot Firmware Tutorial

From Quadshot Wiki
Jump to: navigation, search

Before You Begin

This document assumes you have Paparazzi installed and are using the Transition Robotics Toytronics branch. See the Software User Guide for more information.

Compile and upload firmware

  • Remove the propellers from your Quadshot.
  • Compile the firmware:
cd paparazzi
make AIRCRAFT=QS4_M2A2 clean_ac ap.compile
  • Connect the flight battery. (This prevents the Lisa's small onboard power supply from attempting to drive the servos and motor controllers when it is connected to USB power)
  • Connect your autopilot board to your computer using the appropriate USB cable.
  • Upload the firmware to Lisa:
make AIRCRAFT=QS4_M2A2 ap.upload

Flashing precompiled autopilot firmware

If you have a compiled firmware file (usually called ap.bin), you can load it directly onto the Lisa/M or Lia using the bootloader. Connect your autopilot to your computer via USB and ensure the bootloader is running (Lisa/M or Lia LEDs cycling up and down). Then, from your paparazzi installation directory, enter the command

sw/tools/dfu/ /path/to/the/firmware/folder/ap.bin

When an aircraft's firmware is compiled, the ap.bin file is created in


Notes and troubleshooting

Different autopilot and/or IMU

Depending on your Quadshot "brain" and IMU, replace QS4_M2A2 in the above commands with the following:

  • QS4_L: Lisa/L (the Quadshot Kopi Luwak)
  • QS4_LIA: Lia (the Mocha Quadshot)
  • QS4_M1A1: Lisa/M 1.0 with Aspirin 1.x (e.g., the Quadshot Cappuccino with self-provided Lisa/M v1.0 "brain" and Aspirin v1.x IMU)
  • QS4_M2A1: Lisa/M 2.0 with Aspirin 1.x (e.g., the Quadshot Cappuccino with self-provided Lisa/M v2.0 "brain" and Aspirin v1.x IMU)
  • QS4_M2A2: Lisa/M 2.0 with Aspirin 2.1 (e.g., the Quadshot Espresso)

Mac OS X Notes

If you are running Paparazzi on Mac OS X or have a non-default Paparazzi installation you may need to provide additional command line parameters to the ap.upload command line:

PYTHON: If the python installation is not located in your default path or you need to use a different version you can call for example:

make AIRCRAFT=QS4_M2A2 PYTHON=python2.7 ap.upload


make AIRCRAFT=QS4_M2A2 PYTHON=/opt/paparazzi/bin/python2.7 ap.upload

JTAG vs. Luftboot USB Bootloader

FLASH_MODE: Select JTAG instead of Luftboot firmware upload, for example:


BMP_PORT: Use Black Magic Probe instead of Floss-JTAG.

make AIRCRAFT=QS4_M2A2 FLASH_MODE=JTAG BMP_PORT=/dev/ttyACM0 ap.upload

or on Mac OS X you should check what filename the black magic probe shows itself on your system by running:

ls /dev/cu.usbmodem*

and then using the first name in the following call to Paparazzi make command:

make AIRCRAFT=QS4_M2A2 FLASH_MODE=JTAG BMP_PORT=/dev/cu.usbmodemDDE091B1 ap.upload