This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error building watchdog (undefined reference to nrfx_wdt_init)

Hello,
I'm trying to add watchdog to my application based on SDK16.0 and NRF52811.

In sdk_config.h I have added :

#define WDT_ENABLED 1
#define NRFX_WDT_ENABLED 1

In my main.c :

#include "nrf_drv_wdt.h"

void watchdog_init(void)
{
    nrf_drv_clock_init();
    nrf_drv_wdt_config_t config = NRF_DRV_WDT_DEAFULT_CONFIG;
    uint32_t err_code = nrf_drv_wdt_init(&config, watchdog_handler);
    APP_ERROR_CHECK(err_code);
    err_code = nrf_drv_wdt_channel_alloc(&m_channel_id);
    APP_ERROR_CHECK(err_code);
    nrf_drv_wdt_enable();
}

int main(void) {
    (...)
    watchdog_init();
}

I'm getting error :

/usr/share/segger_embedded_studio_for_arm_4.50/gcc/arm-none-eabi/bin/ld: Output/soft_s112 Release/Obj/main.o: in function `nrf_drv_wdt_init':
<>/s112/ses/../../../../../../integration/nrfx/legacy/nrf_drv_wdt.h:102: undefined reference to `nrfx_wdt_init'

What am I missing ?

Thanks for your help !
Quentin

Parents Reply Children
No Data
Related