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

nrf_drv_clock_init()

.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_clock_init (referred from main.o).
.\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_clock_lfclk_request (referred from main.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.

i am getting this error. Got to know that this can be due to the incorrect paths, but paths provided are correct.

how to debug this? as i am working on nrf52840 DK

  • Hi,

    Have you added the nrf_drv_clock.c file to your project? And set NRF_CLOCK_ENABLED to 1 in the projects sdk_config.h?

  • i have added the nrf_drv_clock.c but unable to find NRF_CLOCK in sdk_config.  its not there in the sdk_config.h

  • Was a small typo in my last response. If you can't find it, add these clock settings to the sdk_config.h:

    // <e> NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver - legacy layer
    //==========================================================
    #ifndef NRF_CLOCK_ENABLED
    #define NRF_CLOCK_ENABLED 1
    #endif
    // <o> CLOCK_CONFIG_LF_SRC  - LF Clock Source
     
    // <0=> RC 
    // <1=> XTAL 
    // <2=> Synth 
    // <131073=> External Low Swing 
    // <196609=> External Full Swing 
    
    #ifndef CLOCK_CONFIG_LF_SRC
    #define CLOCK_CONFIG_LF_SRC 1
    #endif
    
    // <o> CLOCK_CONFIG_IRQ_PRIORITY  - Interrupt priority
     
    
    // <i> Priorities 0,2 (nRF51) and 0,1,4,5 (nRF52) are reserved for SoftDevice
    // <0=> 0 (highest) 
    // <1=> 1 
    // <2=> 2 
    // <3=> 3 
    // <4=> 4 
    // <5=> 5 
    // <6=> 6 
    // <7=> 7 
    
    #ifndef CLOCK_CONFIG_IRQ_PRIORITY
    #define CLOCK_CONFIG_IRQ_PRIORITY 6
    #endif
    
    // </e>

  • after including this piece of code, i got more errors

    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_disable (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_enable (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_hfclk_start (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_hfclk_stop (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_init (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_lfclk_start (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_lfclk_stop (referred from nrf_drv_clock.o).
    .\_build\nrf52840_xxaa.axf: Error: L6218E: Undefined symbol nrfx_clock_uninit (referred from nrf_drv_clock.o).
    Not enough information to list image symbols.
    Not enough information to list load addresses in the image map.

  • Can you try setting this NRFX_CLOCK_ENABLED to 1 if it aren't set to 1 already?

    Got to know that this can be due to the incorrect paths, but paths provided are correct.

    How did you include the paths and what is your path?

Related