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
  • Guys... can you please fix the legacy support you tried to use in sdk_config.h? I was bitten once more with this...

    Example: in the sdk_config.h you provide in the template project, you have defines for both, SAADC_ENABLED and NRFX_SAADC_ENABLED. This suggests as per comments in sdk_config.h that the latter actually enables the renames nrfx_ prefixed driver. It doesn't since the setting is silently overwritten in apply_old_config.h:

    #if defined(SAADC_ENABLED)
    
    #undef NRFX_SAADC_ENABLED
    #define NRFX_SAADC_ENABLED  SAADC_ENABLED

    This is not just true for SAADC, but others as well.

    Also, it would make things a lot clearer if you did not include modified sdk_config.h files in the example projects. You provide a mechanism to #include "app_config.h". Why not use it? It makes things perfectly clear: "for this example, we modified this, this and this".

    Thanks for listening again guys. I hope these comments help to make the SDK easier to understand. Keep up the good work!

    PS: the renaming of symbols through macro's kills debugability. So please please please... don't! Example:

    #define nrf_drv_saadc_uninit            nrfx_saadc_uninit

    It looks like there is a function "nrf_drv_saadc_uninit" after this backward-compatibility definition, but in the debugger there is no way I can find a symbol named nrf_drv_saadc_uninit which makes it unnecessary hard to put a breakpoint on it for example.

Reply
  • Guys... can you please fix the legacy support you tried to use in sdk_config.h? I was bitten once more with this...

    Example: in the sdk_config.h you provide in the template project, you have defines for both, SAADC_ENABLED and NRFX_SAADC_ENABLED. This suggests as per comments in sdk_config.h that the latter actually enables the renames nrfx_ prefixed driver. It doesn't since the setting is silently overwritten in apply_old_config.h:

    #if defined(SAADC_ENABLED)
    
    #undef NRFX_SAADC_ENABLED
    #define NRFX_SAADC_ENABLED  SAADC_ENABLED

    This is not just true for SAADC, but others as well.

    Also, it would make things a lot clearer if you did not include modified sdk_config.h files in the example projects. You provide a mechanism to #include "app_config.h". Why not use it? It makes things perfectly clear: "for this example, we modified this, this and this".

    Thanks for listening again guys. I hope these comments help to make the SDK easier to understand. Keep up the good work!

    PS: the renaming of symbols through macro's kills debugability. So please please please... don't! Example:

    #define nrf_drv_saadc_uninit            nrfx_saadc_uninit

    It looks like there is a function "nrf_drv_saadc_uninit" after this backward-compatibility definition, but in the debugger there is no way I can find a symbol named nrf_drv_saadc_uninit which makes it unnecessary hard to put a breakpoint on it for example.

Children
No Data
Related