With SES, I'm trying to build an app which includes nrf_drv_clock.h. There are two functions declared there that I call in my own main.c:
- nrf_drv_clock_init()
- nrf_drv_clock_lfclk_request(NULL)
Specifically, as follows:
static void lfclk_request(void) { ret_code_t ret; if( (ret = nrf_drv_clock_init()) != NRF_SUCCESS ) printf("nrf_drv_clock_init failed, ret=%d\n", ret); nrf_drv_clock_lfclk_request(NULL); } |
Now, as a newbie, I'm banging my head against a wall.
I have nrf_drv_clock.c in my project, as I think I should, but when building the code, then comes the error
1> Diagnostics: 1> error: undefined symbol: nrf_drv_clock_init 1> error: undefined symbol: nrf_drv_clock_lfclk_request Build failed |
It seems that the problem pinpoints to the following in nrf_clock.c, as lines below it are greyed in SES:
#include <nordic_common.h> #include "nrf_drv_clock.h" #if NRF_MODULE_ENABLED(NRF_CLOCK) |
To me, this contradicts with my sdk_config.h that apparently has NRF_CLOCK_ENABLED
// <e> NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver - legacy layer //========================================================== #ifndef NRF_CLOCK_ENABLED #define NRF_CLOCK_ENABLED 1 #endif |
(Actually, I don't find any path, how the compilation of nrf_drv_clock.c could even thoretically include my sdk_config.h - and the definition.)
What am I doing wrong?