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

nrf52832 undefined reference to `nrfx_comp_init'

Hello guys,

I'm trying to use the new NRFX library but I've hit the wall with the following error when trying to use the comparator API:

undefined reference to `nrfx_comp_init'

This happens during the link stage. I can see the nrfx_comp.c being compiled, I've set the #define NRFX_COMP_ENABLED 1 in sdk_config.h but the error still persists.

I've included #include "nrfx_comp.h" in my project.

I'm using GCC. Any help is appreciated.

Regards,

L. B.

Parents Reply
  • This is a known issue, where in some example projects sdk_config.h it's resolved and some not.

    This is why I maintain my own base sdk_config.h version (per SoftDevice) which I have 

    #ifdef NRF_LEGACY_LAYER_ENABLED
    
    ...
    
    #endif // NRF_LEGACY_LAYER_ENABLED

    Surrounding all legacy nrf_drv #define (to allow easier merge of newer sdk_config.h versions)

Children
No Data
Related