Skip to content

Project structure

Evgeniy edited this page Mar 1, 2026 · 18 revisions

Project structure

  • STM23H7xx -- STM32H7 specific code

  • STM23F4xx -- STM32F4 specific code

  • periphdef -- peripherals configuration files, that describes all interfaces, pins and external devices connected to STM32 MCU.

    • h7flight.h -- STM32H723 based board configuration.
    • f4flight.h -- STM32F405 based board configuration
  • pcb -- the directory containing schematics and PCB projects for the flight controllers:

  • additional -- additional files

  • devices -- drivers for devices used by the flight controller:

    • device.h -- main interface for a character device. Used by almost all devices in devices directory.
    • uartconf.c and uartconf.h -- driver that receives and sends data through one of UART's used for configuration and debugging.
    • bmp280.c and bmp280.h -- driver for a bmp280 barometer (currenty unused).
    • crsf.c and crsf.h -- driver for the CRSF protocol used by a ERLS receiver to interract with the main MCU through UART.
    • esp8266.c and esp8266.h -- driver used to exchange data with esp8285 through SPI.
    • hmc5883l.c and hmc5883l.h -- driver for an HMC5883L magnetometer (currently unused).
    • hp206c.c and hp206c.h -- driver for a HP206C barometer.
    • dps368.c and dps368.h -- driver for a DPS368 barometer.
    • mpu6500.c and mpu6500.h -- I2C driver for mpu6050 and mpu6500 IMUs (accelerometer + gyroscope).
    • qmc5883l.c and qmc5883l.h -- driver for an QMC5883L magnetometer.
    • icm42688.c and icm42688.h` -- driver for an icm42688 IMU (accelerometer + gyroscope).
    • m10.c and m10.h -- driver for a M10 GNSS module.
    • w25.c and w25.h -- driver for a w25q SPI flash.
    • irc.c and irc.h -- driver for an IRC Tramp controlled VTX device.
    • dshot.h and dshot.c -- driver for DSHOT-300 ESC communication protocol.
  • main.c -- all routines related to flight control.

  • util.c and util.h` -- common utility functions that can be used in more than one source file.

  • dsp.c and dsp.h -- functions for PID control and data filtering like low-pass filtering and complimentary filtering.

  • command.c and command.h -- configuration and informational commands processing API.

  • timev.c and timev.h -- periodic event processing API.

  • settings.c and settings.h -- functions for read and write setting stored in MCU's internal flash.

  • runvals.c and runvals.h-- global values used when UAV is running.

  • log.c and log.h -- functions for work with flight log stored in external flash device.

  • crc.h -- CRC-8 and CRC-16 implementation.

  • Doxyfile -- Doxygen configuration.

  • Makefile -- makefile for STM32 code.

  • mcudef.h -- include file to choose proper defines for MCU.

  • uavconf -- configuration tool that works through wi-fi AP created by flight controller using UDP protocol.

    • term -- terminal configuration tool.
      • main.c -- terminal tool source file.
      • Makefile -- makefile for terminal tool.
    • gui -- gui configuration tool:
    • api -- API for work with UAV configuration commands.
    • uavconf_droid -- project for andriod gui compilation.
    • plots -- scripts for flight log processing.
    • values_4s_accro.txt -- settings values for quadcopter with 4s battery optimized for accromode.
    • values_4s_acc.txt -- settings values for quadcopter with 4s battery optimized for attitude stabilization mode.
    • values_2s_accro.txt -- settings values for quadcopter with 2s battery optimized for accromode.
    • values_2s_acc.txt -- settings values for quadcopter with 2s battery optimized for attitude stabilization mode.

Clone this wiki locally