Quadcopter Flight Controller
One of the best ways to really learn firmware development is to develop your own flight controller. You'll get to learn things like:
- Firmware and hardware design considerations
- Driver development
- Control theory
- Automated testing and continuous integration
So this is my attempt at that.
MCU - STM32F407 with an ARM Cortex M4 chip
IMU - LSM6DSL 6-DOF gyroscope and accelerometer
RC receiver - Flysky FS-iA6B 2.4GHz 6channel with PPM
RC - Flysky FS-i6
Multithreaded flight control firmware developed using ChibiOS RTOS.
-
GNU ARM cross-compiler and debugger(I'm using 7.2.1)
-
Autoreconf (for building CppUTest)
apt install automake autoconf libtool
Clone all submodules with git submodule update --init --recursive
, then run make install
Instructions coming soon.
Compile with make
.
Next, have two terminal windows open, and in each one:
- Run
openocd -f stm32f4.cfg
on one window - Run
arm-none-eabi-gdb build/ch.elf
. Here you'll get a prompt much like running regular GDB. Then run the following commands:tar ext :3333
mon reset halt
load
run
ChibiOS provides a free Eclipse-based IDE for Windows computers that you can download here. Download and unzip the file into C:\
. Right-click on Project Explorer, go to Import > C/C++ > Existing Code as Makefile Project, then point to the codebase location. Build the project, then flash.
For more information on setting up ChibiStudio, visit this link.
Instructions incomplete for now, I'll add to this later on. For now, at least you know how to compile the code and load it into the board.