targets.mk - GaloisInc/betaflight GitHub Wiki

Purpose of this document

This document is meant to describe the purpose of and the content found within targets.mk.

targets.mk

Targets.mk is a small makefile fragment found within the top-level make folder. It’s purpose is to organize all target boards by their microprocessor, and ensure the microprocessor is supported by Betaflight. Based on the type of its microprocessor, target boards are separated into groups: F1_TARGETS, F3_TARGETS, F4_TARGETS, F7_TARGETS, H7_TARGETS. The variable TARGET_MCU gets set depending on which group the target board belongs to.

TARGET_MCU is used at the bottom of the file to assign microprocessor-specific compiler flags. For example, if the target board has an STM32F4, one set of compiler flags will be applied; if the board has an STM32F7, a different set of compiler flags gets applied.

To accommodate the MAIXBIT board, our team added a new group to targets.mk.