Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Finding module dependencies

I'm digging into OpenThread, using the NRF52840 DK.  I find myself spending most of my time trying to figure out module dependencies.  Is there any way to quickly get all the configuration options in sdk_config.h, all the source files in Makefile, and anything else I need to use a module in my project.

For example, I started with examples/thread/cli.  I want to change the logging to use the debugging port (UART) instead of RTT.  I see that examples/ble_central/ble_app_blinky_c logs to the debug port, so I want to copy whatever it does into my app.  It looks like I need to turn on some UART flags and turn off RTT flags.  However, there are various flags that might apply.  If I take an educated guess, NRFX_UARTE_ENABLED seems to be needed.  So I copy that section from the blinky app. 

This introduces many errors that require a sisyphean effort to track down.  Fixes lead to more errors until I give up.  I've written utilities to compare projects and to expand #includes.  Grep and find are my friends.  It still feels like slogging through concrete.

Although I'm open to any suggestions about this specific problem, I'm really more interested in learning to decipher module dependencies.  My approach does not seem like a practical way to use an SDK.

I see there is another post about "Module dependencies" from jev.  The response was to request more documentation from the SDK team - certainly a good idea.  But the fact is that other people are using the SDK successfully, now.  Are they just requesting specific answers here every time they need to use a module?

What am I missing?

Parents Reply
  • That's a good suggestion.  I can write a tool to extract headers from a module, compare it to the ones I've already got in my include path and .c files and adjust accordingly.  

    Any suggestions about how to fix sdk_config.h?  Configuration settings are more than just "turn this module on".  It looks like there are interdependencies and possibly even conflicts.  I.e. when I turn on UART logging, I may have to turn off RTT logging.

Children
Related