Station open - training dossier Hangar Brief / UAV school Public release - not classified
Aviation dossier Hangar Brief

Home / Instruments

Dossier 10 / Open source

Flight-control firmware

The flight controller is a small board. The firmware is the crew that lives on it: the gyro reader, the mixer, the navigator, and the failsafe. Almost every serious amateur stack is open source. This plate lists the projects that matter and what each one is for.

Two kinds of cockpit

Open flight software splits the way wartime aviation split between a fighter and a bomber. One family is built for a pilot on sticks: fast loops, rates, a picture in the goggles. The other is built for a navigator: waypoints, return-to-home, airspeed hold, a mission that continues if the radio goes quiet.

You can put navigation on a racer, and you can fly a mapping plane by hand. The firmware still has a centre of gravity. Pick the project whose centre matches the job, then flash a board that the project actually supports.

Firmware is not a paint job. Changing from Betaflight to INAV, or from ArduPilot to PX4, is a change of standing orders. The radio may stay. The modes, the configurator, and the failsafe will not.

How to read this list

Each project below is still public source, with a community and a flashing tool. Historical names (MultiWii, Baseflight, Cleanflight, OpenPilot) are here so the family tree makes sense. They are not where a new build should start. When you are ready to put a hex on a board, or compile the tree yourself, use the build and flash plate.

Licences matter if you ship a product. GPLv3 (Betaflight, INAV, ArduPilot) expects you to share changes. BSD / permissive (PX4) is easier to close. Read the file in the repo, not a forum summary.

Quick plate

Which stack for which machine

If you are building Start here Why
5-inch FPV racer or freestyle Betaflight The default mixer, filter, and rates language of that sport.
GPS quad, long-range, or a flying wing that must come home INAV Navigation without leaving the FPV-board world.
Survey plane, copter, rover, or boat on one ecosystem ArduPilot The broadest vehicle list and the oldest continuous mission stack.
Research, ROS, or a company airframe PX4 Modular, permissive licence, strong companion-computer story.
Collective-pitch helicopter Rotorflight Swashplate and governor work that Betaflight does not pretend to do.
University lab, tiny indoor quad Crazyflie A whole research platform, not just a mixer.
Raspberry Pi on the aircraft Companion, or ArduPilot/PX4 Linux A Pi is a computer. Pair it with a real FC, or use a supported hat. Not a Betaflight target.
I want to flash or compile the firmware myself Build and flash plate Hardware, toolchain, and the difference between a cloud hex and building from source.

Stick-flying family

From MultiWii to the modern racer

betaflight.com / GPLv3

Betaflight

The standard firmware on FPV miniquads. It exists to make a gyro, four motors, and a set of rates feel like one aircraft. The loop is fast, the filter stack is deep, and the configurator is how most pilots first see a PID. It does not try to be a survey autopilot. Position hold is not the point; the point is that the craft stays where you put the sticks.

Our simulator dossier notes that WebFPVSimulator compiles a Betaflight 4.5.1 loop to WebAssembly for that reason: this is the feel people mean when they say “a real quad.”

Source on GitHub

inavflight.com / GPLv3

INAV

A fork of the same Cleanflight tree, aimed at aircraft that must know where they are. GPS return-to-home, waypoint missions, cruise and altitude hold, flying wings and multirotors on one configurator. If Betaflight is a fighter, INAV is the army co-operation machine: still a small board, but with a map and a lost-link plan.

Pilots often move here when a long-range quad or a foam wing outgrows “just fly it home by eye.” The radio and the FPV camera stay familiar. The modes do not.

Source on GitHub

emuflight.github.io / GPLv3

EmuFlight

A Betaflight-line fork that treats the tune as the whole problem: different filter and PID opinions, a following among pilots who want a particular feel the mainline tree will not ship. Same class of aircraft, same kind of configurator, a different set of standing orders in the loop.

Worth knowing so a dump file or a “flash this hex” thread does not surprise you. Not a second navigation stack.

Source on GitHub

rotorflight.org / GPLv3

Rotorflight

Collective-pitch helicopters need a swashplate, a governor, and a tail that is not just a yaw motor. Rotorflight takes the Betaflight engineering culture and spends it on that machine. If you came from a quad, this is the first firmware that will talk to you about cyclic and collective instead of four equal arms.

Source on GitHub

Lineage, so the old names make sense

MultiWii (around 2010) put a cheap Wii gyro on an Arduino and taught a generation that a mixer could live in a hobby board. Baseflight moved that idea onto 32-bit STM32. Cleanflight organised the community and the configurator. Betaflight and INAV grew out of that hangar. You will still see the names on dusty blogs. Flash the living trees, not the museum pieces.

Mission family

Autopilots that plan a route

ardupilot.org / GPLv3

ArduPilot

The oldest major stack that is still the default answer for “I want an unmanned vehicle, not a toy.” ArduCopter, ArduPlane, ArduRover, and ArduSub share one project. Mission Planner on Windows is the classic ground station; QGroundControl and others also speak its MAVLink dialect. It will fly a mapping wing, a heavy copter, a boat, or a rover with the same ideas: modes, geofence, a mission file, a log you can read after.

Context: this is the firmware that grew up with DIY Drones in the late 2000s and never stayed a quad-only toy. If your job is hours on station or a waypoint list, start the briefing here. Missions, docks, and the AI layer sit on the autonomy plate.

Source on GitHub

px4.io / BSD-3 / permissive

PX4 Autopilot

The other professional-grade open stack, under the Dronecode foundation. Modular by design: a flight stack that expects a companion computer, ROS 2, and cameras that think. QGroundControl is the usual briefing table. Manufacturers like the licence because they can ship a product without publishing every change – which is also why researchers and companies sit in the same hangar.

If ArduPilot feels like a well-worn squadron manual, PX4 feels like a modern instrument bay: more pieces, more ways to wire a computer next to the FC, a different culture of modules and messages.

Source on GitHub

paparazziuav.org / GPLv2

Paparazzi UAV

Started in 2003 at ENAC in France, before most of the names above existed. A complete system: airborne code, a ground station, and a taste for unusual airframes – flying wings, clouds of swarms, academic experiments. It is not the first download for a backyard 5-inch. It is the reminder that open autopilots are older than the smartphone gyro.

Source on GitHub

Ground stations / MAVLink

The other half of the cockpit

Firmware is mute without a place to write missions and read logs. Betaflight Configurator and INAV Configurator are the stick-flying benches. Mission Planner is the ArduPilot chart table. QGroundControl talks to PX4 and ArduPilot over MAVLink, the common telegram format for modes, waypoints, and telemetry. Learn the ground station with the firmware. They are one crew.

Other hangars

Research, history, and near neighbours

bitcraze.io / BSD

Crazyflie

A nano-quad research platform from Bitcraze. Open firmware, a Python API, positioning decks, and a culture of labs rather than race tracks. If the aircraft must fit in a hand and publish a paper, this is the line.

Firmware source

Historical

OpenPilot, LibrePilot, dRonin

OpenPilot was an early 32-bit autopilot with a polished GCS. LibrePilot and dRonin carried pieces of that tree after the project fractured. Useful when you inherit an old board. Not where a new student should enlist.

Not firmware, still open

Radios you will pair with it

ExpressLRS is the open command link most FPV pilots flash next. Crossfire is closed. Digital video is mostly vendor stacks. The FC project and the radio project are separate briefings that have to agree on a serial protocol (CRSF, SBUS, MAVLink). Those words are languages, not brands of firmware. The lexicon lives on the radio-room plate.

Companion and Linux boards

Can you use a Raspberry Pi?

Yes – with the mission stacks. A Raspberry Pi is a small Linux computer, not an STM32 flight controller. It will not replace a Betaflight board on a 5-inch racer. It will sit next to a Pixhawk, or, on some ArduPilot and PX4 builds, it will be the autopilot if you add the right sensor hat.

Think of two jobs. The usual one: the Pi is the navigator’s table. A real FC still runs the mixer at a kilohertz. The Pi talks MAVLink or XRCE-DDS, runs a camera, ROS 2, a detector, or a ground-station proxy. That pairing works with ArduPilot, PX4, and INAV, and it is how most autonomy projects use a Pi 4 or Pi 5.

The rarer job: the Pi itself flies the aircraft. ArduPilot’s Linux port (PilotPi, Navio2, and similar hats) puts gyros and a PWM rail on a HAT so the Pi is the FC. PX4 has also shipped on Navio2-class Linux boards. You gain USB, cameras, and a full OS. You give up the hard real-time certainty of a bare STM32. Fine for a slow scout. Wrong for a gate racer.

Quick plate

  • Betaflight, EmuFlight, Rotorflight – no. Flash an F4, F7, or H7 board. The Pi can only watch (OSD, logs, a camera), not fly the loop.
  • INAV – same as above for the mixer. A Pi can be a companion for video or a GCS, not the INAV target.
  • ArduPilot – yes as companion, and yes as the autopilot with a supported Linux hat (Navio2, PilotPi, and the current Linux board list).
  • PX4 – yes as companion (the common path). Linux/Navio-style targets exist; most people still put PX4 on a Pixhawk and ROS on the Pi.
  • Paparazzi, Crazyflie labs – Pi is usually the ground or swarm computer, not the airborne STM32.

Companion – the useful default

Pi + a real FC

Serial or USB from Pixhawk, Cube, Matek, or another MAVLink board into a Pi 4 or Pi 5. Run MAVSDK, MAVROS, or PX4’s uXRCE-DDS. Add a camera for mapping or YOLO. This is the stack the autonomy plate assumes. Power the Pi from a BEC that will not brown out when the motors bite.

Autopilot on Linux

ArduPilot and PX4 on the Pi

Buy a hat that already has a gyro, compass, and PWM or DShot outputs – do not invent your own IMU wiring. Follow the project’s Linux board page, not a random image. SITL on a Pi is also valid: the firmware flies a simulated aircraft while you learn missions with no props.

ArduPilot on Navio2 / Linux

What the Pi is bad at

Racing loops and hard timing

Linux will pause. A gyro loop must not. That is why Betaflight stays on a microcontroller. A Pi 5 can run a small detector; it will not feel like a Jetson Orin, and it will not out-time an H7. Use it for maps, cameras, and missions. Leave acro on carbon and STM32.

Languages the firmware must speak

CRSF, SBUS, MAVLink, DShot

Firmware is the crew. These are the languages the crew has to hear and write. Basic first, then the detail, then how they differ. The flying picture is on the SIG-01 blueprint.

Sticks in

CRSF and SBUS

Basic. How a receiver hands stick positions to Betaflight, INAV, or ArduPilot.

Detail. Both are digital packets on a UART. SBUS is one way and inverted. CRSF is both ways and is what ELRS and Crossfire use. PWM and PPM are the older analog cousins – a pulse, or a train of pulses – still offered in the receiver tab for trainers.

How it differs. Wrong receiver type in the configurator looks like a dead radio. The firmware is fine. It is listening in the wrong dialect. Full cards: SBUS, CRSF, PWM.

Missions

MAVLink

Basic. How a navigator’s computer talks to ArduPilot or PX4: waypoints, modes, a map.

Detail. A serial or UDP sentence between a ground station, a Raspberry Pi companion, and the autopilot. It is not a stick protocol. You do not set “MAVLink” in the Betaflight receiver tab and expect a Radiomaster to fly acro.

How it differs. CRSF is “the sticks just moved.” MAVLink is “fly to this point and come home.” A mission stack often speaks both: CRSF or SBUS from the handheld for overrides, MAVLink from the GCS for the plan.

Motors out

DShot and motor PWM

Basic. How the mixer tells an ESC to spin. Not how the radio talks.

Detail. DShot is a digital number (150/300/600/1200). Old motor PWM is a pulse. Servos on a wing still want PWM. Bidirectional DShot can send rpm back into the filter.

How it differs. Receiver tab = CRSF or SBUS. Motors tab = DShot. Same board, two menus, two languages. Mixing them up is the most common “it will not arm” briefing after a first flash.

The door

UART

Basic. A numbered serial port. A door. Not a language.

Detail. You assign a tenant: Serial RX for the receiver, GPS, VTX control, MSP to a computer, MAVLink to a Pi. One tenant per UART on a racing board.

How it differs. Flashing firmware does not pick the UART. You do, in Ports. A perfect ELRS bind with Serial RX still off is a silent aircraft.

The flashing bench

How someone builds and loads firmware

“Build firmware” means two different jobs. Most pilots flash a hex the project already compiled – cloud build, configurator, done. A smaller crew compiles from source on a laptop: they changed a file, need a custom target, or want to read the mixer instead of trusting a stranger’s dump. Both jobs need the same hardware discipline. Only the software bench changes.

You are not writing a flight controller from a blank editor. You are putting a living open-source crew onto a board that the project already lists. Inventing your own gyro loop is a research career, not a Saturday.

Hardware that must be on the bench

  • A supported flight controller. Betaflight, INAV, EmuFlight, Rotorflight want an STM32 F4, F7, or H7 board the project names by target – SpeedyBee, Matek, MicoAir, a MEPS stack. The chip family is not the target. Two F722 boards can need two different hexes.
  • A mission board if that is the stack. ArduPilot and PX4 want a Pixhawk, Cube, CUAV, Matek H743, or another board on the current hardware list. A racing FC will often flash and then sulk: no compass, no power module, the wrong IMU.
  • USB that actually talks. Data cable, not charge-only. The computer must see a COM port or a DFU device. On Windows that sometimes means an STM32 Virtual COM or Zadig driver. On Linux it means udev rules so you are not root to flash.
  • A way into DFU if the board bricks. Boot button, boot pads, or an ST-Link / SWD probe. First flashes rarely need it. The second flash, after a bad target, often does.
  • Props in the box. A smoke stopper or no pack on the motors. USB can power the FC. It should not spin carbon.
  • The radio and receiver you will fly. After the hex lands you still have to bind, set Serial RX, and test failsafe. Firmware without a radio test is a half-written standing order.
  • For a useful ArduPilot / PX4 first boot: GPS, compass, and a power module the GCS can read. You can flash without them. You cannot brief a mission without them.

Software that must be on the computer

  • The project’s own bench. Betaflight Configurator or INAV Configurator for stick stacks. Mission Planner or QGroundControl for ArduPilot and PX4. The configurator flashes, talks MSP or MAVLink, and is where Ports, Receiver, and Motors live after the hex is on.
  • A current browser if you use cloud build. Betaflight and INAV will compile a hex for your target in the cloud and hand it to the configurator. That is the default path. You do not need a compiler for a stock racer.
  • Git, if you compile. Clone the official repository. Check out a release tag, not a random Tuesday on master, unless you mean to test nightlies.
  • The toolchain the docs name. For Betaflight and INAV that is usually an ARM GCC (`gcc-arm-none-eabi`) and `make`, or the project’s Docker image so your laptop’s OS does not fight the compiler. ArduPilot uses `waf` and its own setup script. PX4 prefers the `px4-dev` Docker. Follow the current “Building” page on that project. Forum copies rot.
  • Disk and patience. A Betaflight tree is small. ArduPilot and PX4 pull a lot. A few gigabytes and a machine that can run Docker are enough. A phone is not a compile bench.
  • SITL, if you want to fly the code with no props. ArduPilot and PX4 will run a simulated aircraft on the same laptop. Betaflight has fewer “mission” reasons to do that; the browser trainer is a school loop, not a compiled FC.
Stack Usual flash tool If you compile from source Board class
Betaflight, INAV, EmuFlight, Rotorflight That family’s Configurator, often via cloud build Git + ARM GCC or the project’s Docker. `make` a named target. Flash the `.hex`. Named F4 / F7 / H7 racing or long-range FC
ArduPilot Mission Planner, QGroundControl, or `uploader` Official setup, then `waf` for that vehicle and board. Or download a stable APJ/hex. Pixhawk-class, Matek H7, supported Linux hat
PX4 QGroundControl `px4-dev` Docker or the native toolchain. Build a board target. Upload from QGC. Pixhawk-class, some Linux / companion pairings
ExpressLRS (radio, not FC) ELRS Configurator or Lua on the handheld Only if you are changing the radio firmware. Separate briefing, same USB manners. TX module and RX, not the flight controller

Job one – most students

Flash a published hex

Basic. The project already compiled the crew. You pick the board name and write the file.

Detail. Read the silk and the vendor listing. In the configurator, choose that exact target – not “any F7.” Dump the working firmware first if the aircraft already flies. Flash. Reconnect. Confirm the 3D model moves when you move the airframe. Then Ports, receiver protocol, DShot, failsafe, props still off. The assembly tutorial walks that order on a 5-inch.

How it differs. You did not “build firmware.” You enlisted a stock crew. That is the right first job. Custom hexes from a stranger are a different risk: you cannot see what they changed.

Job two – when you change code

Compile the tree yourself

Basic. Git the official source, install the toolchain they document, build the same target name the configurator would have picked, flash your `.hex`.

Detail. Work on a release tag unless you intend to test development. Change as little as you can name. Build once before you edit so you know the bench works. Keep the stock hex so you can go home. Licences still apply: GPLv3 wants your changes public if you ship a product.

How it differs. Compiling is how you learn the mixer and how you carry a patch. It is not faster than cloud build, and it will not save a wrong target. A local compile of the wrong board is the same brick as a wrong cloud hex.

Hardware you do not invent

Gyro, flash, and a listed target

Basic. The firmware expects a board the maintainers already wired on paper: IMU, flash chip, UARTs, motor outputs.

Detail. A blank STM32 on a breadboard is not a Betaflight target. Adding a random MPU and hoping `make` will guess the pins is how you get a gyro that lies. If you are designing a new FC, you write a target file and get it merged – that is hardware engineering plus the project’s target docs, not this Saturday briefing.

How it differs. Flashing a SpeedyBee that Betaflight lists is enlistment. Designing a new board is a different hangar. The Raspberry Pi plate above is the same warning: a computer is not an IMU until a supported hat says it is.

After the hex lands

The crew still needs standing orders

Basic. A successful flash is a silent board with new software. It is not an aircraft yet.

Detail. Set the UART tenants. Tell it CRSF or SBUS. Set DShot on the motors tab, not PWM, unless you are driving servos. Bind the radio. Test failsafe by pulling the handheld battery, props off. Save a CLI diff or a `.param` file. Then you have a crew that will still know what to do when the radio dies.

How it differs. Build tools put bytes in flash. The radio lexicon and the assembly plate are how those bytes meet a receiver and four ESCs. Skip that and you have a very expensive paperweight that enumerates on USB.

Discipline at the flashing bench

Dump the current firmware before you overwrite a working aircraft. Confirm the board target – the same STM32 chip is not the same hex. Bind the radio and test failsafe with props off. A wrong flash is not a crash by itself; a wrong failsafe after a flash is.

If you want the hardware picture of where this code sits, open the schema plate. If you want the shopping-list order, use the 5-inch assembly tutorial. If you want to feel a mixer before you buy a board, use the browser trainer – it is a school loop, not a flashed FC.