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

sdk_config.h is not included during the build of integration\nrfx\legacy\nrf_drv_clock.c

Hello.

This issue was tested with nRF5 SDK v17.0.2.

There are steps to reproduce :

  • sdk_config.h should not be included in nrfx_clock.h. It's a default template by SDK. I use modules\nrfx\templates\nRF52833\nrfx_config.h template.
  • call gcc with -M option to see list of included files, or with -E to see preprocessor results.

As a result of this issue, NRF_CLOCK_ENABLED is not defined during compilation of nrf_drv_clock.c. This behaviour is against this Post.

Best regards, Roman

Parents Reply
  • Hi Amanda,

    I noticed that apply_old_config.h uses NRF_CLOCK_ENABLED macro to define NRFX_CLOCK_ENABLED. But the problem is that apply_old_config.h & nrfx_config.h are included without sdk_config.h during compilation of this legacy driver. So, we have incorrect configuration (NRF_CLOCK_ENABLED is incorrect).

    I solved this issue in my project by creating sdk_config.h & nrfx_config.h which includes common configuration file which have all needed macros (like NRF_CLOCK_ENABLED).

    Best regards, Roman.

Children
Related