Architectural Questions on PX4

Hi There! I am working on PX4 and have a couple of questions on my mind. I was wondering if the community could help me out with them. There has been similar questions asked before but they did not receive a reply [1].

  • What mechanisms do you use to debug PX4 code? What is your build system? For example, I use Ubuntu+Windows machine and mostly use printf-like statements to debug the low level code.

  • Mathematical algorithms like nested control loops or EKF are built from the ECL [2] library. Is there a documentation on how to work with it? Modify it? The link on github seems to be broken. I was also wondering how ECL library is tested. Does anyone use Matlab or Mathematica to test whether the math works or not before deploying it?

  • Is there a documentation of the build system? It’s a combination of ninja, GNU Make and cmake. I do have a little bit of knowledge of what it is doing but a guide explaining the inner-working from a high level perspective would make development progress faster/smoother.

Any discussion of the points above is most welcome! Thanks!

[1] Which IDE can i use for Software Development?
[2] GitHub - PX4/PX4-ECL: Estimation & Control Library for Guidance, Navigation and Control Applications

Not a developer, but here are the useful docs links:

1 Like

Thank you for the fast response!

On debugging I am more interested in understanding if it is possible to attach a debugger, which has the capability to show program pointer and the memory state inside the FMU micro-controller (or the IO microcontroller for that matter).

Thanks for the updated link to EKF/ECL! With ECL/EKF, I am looking for a way to test them and play with them outside of the flight stack for both analysis and development.


Re debugging, yes you can attach a debugger . According to those docs gdb works, though I have not tried it.