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

Incompatible redefinition of macro

Hello,

I set up a project on the base of "BLE_APP_UART" to which I added header files and configured the sdk_config.h

Now I get these warnings during compilaiton:

.\RTE\nRF_Drivers\nRF52832_xxAA\nrf_drv_config.h(30): warning: #47-D: incompatible redefinition of macro "CLOCK_ENABLED" (declared at line 347 of "..\config\sdk_config.h")

I'm totally confused now, about the usage of the sdk_config.h with the configuration wizard and additional header files. Because "CLOCK_ENABLED" is also set as checked in the configuration wizard and defined in the nrf_drv_config.h

Is there a guideline to follow, when adding stuff to a project?

Thanks

Parents
  • Hi,

    See this answer (which you linked to yourself yesterday). nrf_drv_config.h is no longer used in SDK 12.x, you should only include sdk_config.h. Where did you get the example BLE_APP_UART from?

    Best regards,

    Jørgen

  • The nrf_drv_twi.h of SDK 12.2 looks like this:

    #ifndef NRF_DRV_TWI_H__
    #define NRF_DRV_TWI_H__
    
    #include "nordic_common.h"
    #include "sdk_config.h"
    

    Make sure that you have the path to the correct header file in your project:

    [SDK_12_2_0_ROOT]\components\drivers_nrf\twi_master
    
Reply
  • The nrf_drv_twi.h of SDK 12.2 looks like this:

    #ifndef NRF_DRV_TWI_H__
    #define NRF_DRV_TWI_H__
    
    #include "nordic_common.h"
    #include "sdk_config.h"
    

    Make sure that you have the path to the correct header file in your project:

    [SDK_12_2_0_ROOT]\components\drivers_nrf\twi_master
    
Children
No Data