PX4 / sapog

Sapog - advanced multiplatform ESC firmware
https://kb.zubax.com/x/cYAh
BSD 3-Clause "New" or "Revised" License
204 stars 142 forks source link
bldc bldc-motor-controller can can-bus canbus dronecode drones esc px4 robotics uav uavcan zubax

PX4 Sapog

Forum Forum

Documentation

Sapog v2 Reference Manual is the main piece of project documentation; make sure to read it. Additional documentation and related resources can be found at the Zubax Knowledge Base.

Change Log

v2.3

v2.2

v2.1

v2.0

Firmware

If you're not running Linux or OSX natively, you can use Bistromathic - a Linux virtual machine pre-configured for embedded development.

Bootloader

The bootloader allows to update the firmware via the standard UAVCAN firmware upgrade protocol, which is documented at uavcan.org. No additional steps are needed to build the bootloader - the build system will build it automatically together with the firmware. The resulting *.elf file will be extended with the bootloader too, so it can be flashed directly into an factory fresh MCU.

Build Instructions

Prebuilt binaries are available at https://files.zubax.com/products/io.px4.sapog/.

Prerequisites:

git submodule update --init --recursive
cd firmware
make RELEASE=1 # RELEASE is optional; omit to build the debug version

The build outputs will be stored into build/:

Execute ./blackmagic_flash.sh [portname] from the tools directory to flash the firmware with a Black Magic Debug Probe.

Development

We recommend Eclipse for IDE, but any other IDE will work equally well. If you prefer Eclipse and need GUI debugging, avoid upgrading to any version newer than Luna, since in newer releases GUI GDB debugging of embedded targets is broken. Otherwise we recommend to use the latest Eclipse together with CLI GDB client. It's inconvenient, but unlike Eclipse it works reliably.

When editing code, please follow the PX4 coding conventions.

Hardware Timer Usage

Hardware

Reference hardware design is published under CC BY-SA 3.0 in the PX4 Hardware repository.

Known commercially available compatible hardware designs are listed below.