This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sdk_config confusion

I was trying to create my own sdk_config based on "$NRF_SDK/config/nrf52840/config/sdk_config.h".

I noticed it contains both the "NRFX" config and "Legacy" configs.

For example, both NRFX_RTC_ENABLED and RTC_ENABLED.

I thought that NRFX_RTC_ENABLED shall have precedence over the "legacy" one so I only defined the NRFX ones.

To my surprise the compiled .o file is empty. Then I traced to "nrfx_glue.h" and "apply_old_config.h". I noticed the legacy settings wil override the NRFX settings.

Why do you put to settings in the same file?

For example:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#if defined(RTC_ENABLED)
#undef NRFX_RTC_ENABLED
#define NRFX_RTC_ENABLED RTC_ENABLED
#if defined(RTC0_ENABLED)
#undef NRFX_RTC0_ENABLED
#define NRFX_RTC0_ENABLED RTC0_ENABLED
#endif
#if defined(RTC1_ENABLED)
#undef NRFX_RTC1_ENABLED
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX