Is there any software flow chart of firmware code?
« on: April 07, 2018, 03:40:19 pm »
Hi all,

I just started to browse firmware code of revolution with qtcreator, and get stuck with two problems now...

(1) Is there any software flow chart of firmware code available? It seems there is no such one on the wiki page. But that would be helpful for me to understand the code execution. :D
(2) The project imported to qtcreator is created at ~/code/librepilot. So everything is included and it is convenient to find function definitions, I thought. But it always jumps to the FIRST definition it finds. For example, when I want to locate where the function PIOS_SYS_Init() of Revolution firmware is been defined, qt would guide me to the one of CC3D firmware. Should I dive into ~/code/librepilot/flight/targets/boards/revolution to created a proper project? :-\
(Attached below is how the project looks like)

Any help is appreciated.
« Last Edit: April 07, 2018, 03:48:05 pm by maple_leaf »

f5soh

  • *****
  • 4476
    • LibrePilot
Re: Is there any software flow chart of firmware code?
« Reply #1 on: April 07, 2018, 03:56:42 pm »
You should search the PIOS_* functions in ./flight/pios dir, of course the PIOS_SYS_Init() function is used not only in Revolution, but all the target boards.
QtCreator target as the name says is initially developped to handle the GCS side / UI.

Did you take a look into this page ?
Especially the Architecture / Flight Code / Modules pages.


No need to do crossposting, thanks.
« Last Edit: April 07, 2018, 04:25:48 pm by f5soh »

Re: Is there any software flow chart of firmware code?
« Reply #2 on: April 07, 2018, 06:49:50 pm »


You should search the PIOS_* functions in ./flight/pios dir, of course the PIOS_SYS_Init() function is used not only in Revolution, but all the target boards.
QtCreator target as the name says is initially developped to handle the GCS side / UI.

Did you take a look into this page ?
Especially the Architecture / Flight Code / Modules pages.


No need to do crossposting, thanks.


Thanks for you reply.

First I am Sorry for the crossposting. The first post is a carelessness and cannot be deleted...

I noticed that page before, but haven't read that in detailed yet.
Actually I want to make Revolution to work with coreless motors rather than brushless ones, but not decide to add another module or edit original module straightly - because I think the former idea may ask for modification and recompilation of gcs(I guess), while the latter asks for more attention should be paid.
Now it seems that I can modify the orginal module to drive coreless motors easily,  with no modification of gcs code.

通过我的 STF-AL10 上的 Tapatalk发言


f5soh

  • *****
  • 4476
    • LibrePilot
Re: Is there any software flow chart of firmware code?
« Reply #3 on: April 07, 2018, 09:25:05 pm »
If you do not change UAVO definition you can modify the flight side (found in ./flight directory) without recompiling the GCS. This solution implies the firmware update will be done using the Rescue method.
If you need to drive brushed motors, you need to add some hardware driver between the Revo and motors (like a FET)  and configure outputs using the UAVOBrowser.

In UAVOBrowser > ActuatorSettings UAVO :
BankUpdateFreq = 4000 Hz
ChannelMax = 250 us
ChannelNeutral = 5 us
ChannelMin = 0 us





Re: Is there any software flow chart of firmware code?
« Reply #4 on: April 08, 2018, 05:48:11 pm »
Well, I will give it a try later at weekend. ;)