# Architectural Questions on PX4

**URL:** <https://discuss.px4.io/t/architectural-questions-on-px4/9858>\
**Category:** Uncategorized\
**Created:** [March 4, 2019, 5:46pm UTC](https://discuss.px4.io/t/architectural-questions-on-px4/9858 "2019-03-04T17:46:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SelimOzel](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@SelimOzel](https://discuss.px4.io/u/SelimOzel)\
**Post date:** [March 4, 2019, 5:46pm UTC](https://discuss.px4.io/t/architectural-questions-on-px4/9858/1 "2019-03-04T17:46:50Z")

</div>

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?](http://discuss.px4.io/t/which-ide-can-i-use-for-software-development/7479)  
[2] [GitHub - PX4/PX4-ECL: Estimation & Control Library for Guidance, Navigation and Control Applications](https://github.com/PX4/ecl)

---

<div class="post-metadata">

**Author:** ![hamishwillee](https://discuss.px4.io/user_avatar/discuss.px4.io/hamishwillee/32/3469_2.png) [@hamishwillee](https://discuss.px4.io/u/hamishwillee)\
**Post date:** [March 4, 2019, 9:35pm UTC](https://discuss.px4.io/t/architectural-questions-on-px4/9858/2 "2019-03-04T21:35:03Z")

</div>

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

- Topics on debugging: [https://dev.px4.io/master/en/debug/](https://dev.px4.io/master/en/debug/)
- EKF/ECL docs moved to [https://docs.px4.io/en/advanced\_config/tuning\_the\_ecl\_ekf.html](https://docs.px4.io/en/advanced_config/tuning_the_ecl_ekf.html) - the readme will be updated in [https://github.com/PX4/ecl/pull/579](https://github.com/PX4/ecl/pull/579)
- AFAIK there are no docs about the build system, other than how to use: [http://dev.px4.io/en/setup/building\_px4.html](http://dev.px4.io/en/setup/building_px4.html)  
@dagar might be able to add more.

---

<div class="post-metadata">

**Author:** ![SelimOzel](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@SelimOzel](https://discuss.px4.io/u/SelimOzel)\
**Post date:** [March 6, 2019, 3:49pm UTC](https://discuss.px4.io/t/architectural-questions-on-px4/9858/3 "2019-03-06T15:49:24Z")

</div>

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.

Best,  
Selim

---

<div class="post-metadata">

**Author:** ![hamishwillee](https://discuss.px4.io/user_avatar/discuss.px4.io/hamishwillee/32/3469_2.png) [@hamishwillee](https://discuss.px4.io/u/hamishwillee)\
**Post date:** [March 6, 2019, 8:56pm UTC](https://discuss.px4.io/t/architectural-questions-on-px4/9858/4 "2019-03-06T20:56:35Z")

</div>

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