Betaflight Root Directory - GaloisInc/betaflight GitHub Wiki

Intro

Betaflight is a large open-source software project that supports dozens of flight controllers. The project has been around for years, with thousands of commits from hundreds of volunteer developers. Because of the sheer scale of the project the Betaflight structure is complex, and can take some time to become familiar with.

The purpose of this page is to give the user a general understanding of Betaflight root directory structure.

docs:

This folder contains Betaflight documentation created by the project’s volunteer developers. It includes useful information for everyone; from casual drone hobbyists, to incoming project developers. While there is a lot of useful information here, the Docs folder doesn’t come close to covering every aspect of the project. It’s useful to become familiar with the Docs folder, but don’t expect it to reveal all of Betaflight’s inner workings.

lib:

This folder contains microcontroller-specific libraries for each type of controller that is used on Betaflight-compatible flight control boards. There are currently five primary ARM microcontroller models which Betaflight fully supports: STM32F1, STM32F3, STM32F4, STM32F7, STM32G4, STM32H7. Each of these models has its own set of drivers. The lib folder is where these model-specific libraries are stored.

make:

It contains most of the makefiles that are part of the MAKEFILE_LIST. More on MAKEFILE_LIST. Each Makefile is intended to provide different SRC files and provide the spec for sets of configurations.

src:

The source directory contains anything that it is related to the functionality of Betaflight. The tree structure looks like this:

/betaflight/src
.
├── link
├── main
├── test
└── utils

Makefile:

This is Betaflight’s top-level Makefile - it is used to build the executable for the dozens of supported flight controllers .During the make process, execution is routed through several Makefiles - located in make and src/main/. Please look above for the MAKEFILE_LIST and how it operates.

⚠️ **GitHub.com Fallback** ⚠️