cancel
Showing results for 
Search instead for 
Did you mean: 

How is STM32 (drone) configuration software interfaced with source code?

ZHama.1
Associate II

Drone firmware like betaflight or cleanflight come with GUI configurator software that allow settings/variables to be changed using the UI and then built uploaded onto an STM32 MCU all through the config software. I know the configuration software uses make to compile but I'm not sure on how it can actually change the variable values within code.

I have a basic robotics project but requires a lot of calibration and changing of physical parts for testing, as a result some variables and source files need not to be defined or compiled and some do depending on many different tests. I want to write a basic UI configuration software like the ones for drones, but I'm not sure on how the config software is able to acccess and change variables in the source code. How is this done?

1 ACCEPTED SOLUTION

Accepted Solutions
Settings are stored in non-volatile memory somewhere. In this case, they are typically stored in a separate page of flash which is not used by the firmware, although it depends on the target.
If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

> I want to write a basic UI configuration software like the ones for drones, but I'm not sure on how the config software is able to acccess and change variables in the source code. How is this done?

The configurator is its own web based application and has very little to do with STM32, except indirectly in that it interfaces with it. The configurator does not modify the STM32 firmware.

Using the configurator and changing the STM32 firmware source code are very different things. The configurator modifies settings, but those settings need to be implemented in firmware.

If you want to modify the STM32 firmware, you'll need to set up the development environment and do it there. Each project has its own way of doing this, I would recommend looking at the relevant repository for tips on how to set this up, or ask in a project-specific forum. It will not be as easy as just starting from an IOC file.

If you feel a post has answered your question, please click "Accept as Solution".

Since it does not modify firmware and that can only be done via an IDE, how is the cofigurator able to modify said settings? Apologies if this was not the right place to post

Settings are stored in non-volatile memory somewhere. In this case, they are typically stored in a separate page of flash which is not used by the firmware, although it depends on the target.
If you feel a post has answered your question, please click "Accept as Solution".