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

Module dependencies

Hey guys,

With the new SDK15, I find myself looking at dependency problems over and over again. Right now, I am trying to setup a simple A/D conversion using nrfx_adc. Found the nrfx_adc module, found the documentation on the infocentre. I included nrfx_adc.h in my code and first compilation: *bam* another 135 errors. Lots of undefined macro's that seem to stem from an inclusion of nrf_adc.h, which out of the blue seems to be included from I don't know where.

Is there an overview of module / header dependencies? Please, please please, add necessary header inclusions in the API descriptions in the infocentre! It would save me days!

Whilst you are at this daughnting task... could you please provide clear "how-to's" on the use of the SDK. Examples are no how-to's if there's no description of what has been changed from defaults in sdk_config.h. I would forever be in your debt if you provided dependency information on what has been set and why. 

Thanks for listening. I'm gonna dive into the "find" and "grep" output again - please send rescue troops if I'm not back after the weekend (I just may be drowned in the SDK somewhere).

Parents
  • Hi,

    I have forwarded your request on more documentation of SDK module dependencies to our SDK team. 

    I'm not sure I understand what you mean is the issue with the SAADC_ENABLED/NRFX_SAADC_ENABLED configs. The legacy layer was provided as a simple way to migrate projects to the new SDK/nrfx driver library without having to update the whole API. If you enable the legacy driver in the sdk_config.h file (SAADC_ENABLED), it is assumed that this will be used. Since this is just a legacy layer running on top of the NRFX_SAADC driver, the apply_old_config.h file makes sure the NRFX driver is enabled, as this is required for the legacy layer to work. If you want to use the new NRFX drivers, you should remove the legacy configs from the sdk_config.h file. If you switch to using the new drivers instead of the legacy layer, you should not face debugging issues due to function renaming using defines. We will migrate more examples to use nrfx drivers in future SDKS.

    Not all examples requre all sdk_config parameters, and not every config is included in the sdk_config.h files. In the examples, only the modules that is used should be enabled. The sdk_config.h file found in config directory contains most config parameters. You should feel free to use this for your project and redefine your configs using app_config.h file.

    Best regards,
    Jørgen

  • That assumption is just bad practice IMHO. This way, we cannot use a mixed style drivers thus new drivers will either be written based on soon-to-be-deprecated API's or we'll have to rewrite existing drivers now too.

Reply Children
No Data
Related