This tutorial is going to walk you through installing Cleanflight on the Cerasus flight controller from Infineon. You do not need programming skills to follow this tutorial.
For those unfamiliar with Cleanflight. It is an open source flight-controller firmware which is used on a broad range of commercial and open source flight-controllers. Since it is targeted towards 32 bit MCU's it provides a perfect base for the Cerasus.
In addition to the firmware setup the build of the Racecopter drone hardware is shown. Note that the hardware is not coupled to the Cerasus sontroller, so you can choose to build your custom hardware.
To follow this guide, you need the following hardware and software:
- Infineon Cerasus V1.0 flight controller
- i-Bus receiver
- XMC Link debugger
- Windows PC with DAVE 4.x software installed
- General drone hardware (X4 Drone frame with Motors, Props, ESC and batteries etc.)
For Linux users: I managed to get DAVE 4.4.2 running in Wine. You need to install the Segger J-Link tools used for flashing manually using the official Segger Packages
- Custom carbon fiber X4 frame
- Racerstar BR2205 2300KV brushless motor
- Racerstar Rev35A 4in1 ESC
- FS-i6 Transmitter
- Flysky FS-A8S i-Bus receiver
- Tattu 1550mAH 4S LiPo battery pack
You might as well use any other drone hardware as long as it fulfills the requirements listed in the Requirements section.
The Cerasus is a flight controller designed by Infineon. It is equipped with a microcontroller from Infineons XMC series (XMC4500 - 32 Bit ARM Cortex M4).
Top | Bottom |
---|---|
The Cerasus can be configured using the Cleanflight Configurator via USB. (Details in the Configure section) You do not need to hook up a battery to configure and play around with the flight-controller, since it can be powered from USB. But don't be afraid to hook up your USB cable when its powered from battery: A diode in the supply rail protects your USB Port from overvoltage..
The Cerasus flight-controller outputs four PWM signals for "communication" with the ESC. The numbering in the picture above (PWM 1 - PWM 4) represents the corresponding motor number. The individual pins are labeled on the PCB.
There are two connectors labeled RC on the PCB. Since my receiver came with a 4-Pin plug, I used the 4-Pin connector on the bottom side of the PCB.
The Firmware for the Cerasus flight controller is located in this repository.
An error accours when opening the project in Dave, when you downloaded the repository using git clone
. As a workaround you can just download the repository by pressing the Download Zip
button in github.
Unzip the contents to a destination of your choice..
Launch the Dave IDE and choose a workspace folder. (For example a folder named Workspace in your home directory. Do not use the just downloaded repository as your workspace.)
Choose File > Import
from the top menu bar. Then choos Infineon >> Dave Project
and click on next.
Browse to the folder you unzipped the contents of the git-repo into. The entry XMC_Cleanflight should apear in the project list.
After the project has finished loading you need to activate the correct build configuration. Rightclick on the XMC_Cleanflight entry in the left sidepanel and select Build Configurations > Set Active > Cerasus
from the context menu.
Now its time to build the firmware. Click on Project > Build All
in the top bar to start the building process.
If everything went well, the console on the bottom of the screen should print Build Finished.
Flashing the firmware to the Mikrocontroller is done using the XMC Link debugger. There are multiple options for flashing and even debugging your freshly build firmware on your hardware (for example directly out of Dave or via the Segger GDB Server). Here I want to show one possibility that is quite straight forward.. For that, you need to open the J-Flash Lite
Programm.
Right after the start of the program it asks you to select the correct Mikrocontroller. For the Cerasus flight controller you need to choose the Infineon XMC45000-1024 entry. Make sure the Interface settings match the one on the screenshot.
After clicking Ok, you need to select your hex file you want to download to the mikrocontroller.
Navigate to your Dave-Workspace you selected when you first started the Dave software. (Remember? In the Build section..)
The hex file should be located in the [DaveWorkspace] > XMC_Cleanflight > Cerasus > XMC_Cleanflight.hex
.
After you selected the correct file, there is nothing stopping you from pressing the "Program Device" button!
If everything went right, the latest entry in the log should say "Done".
Channel mapping Motor direcion Save nach Dump Config file ESC Calibration