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

Build error when merging projects

I am doing rapid development for a project, using the nRF52840 DK. Two key features are USB and BLE central role.

I started with the usb_cdc_acm project and am merging in ble_app_blinky_c.

I added the following information from ble_app_blinky_c:

  1. Component files
  2. sdk_config.h entries
  3. preprocessor include folders
  4. preprocessor defines

I get build errors. It is complaining that NRF_SUCCESS is undefined, and I determined that there is more than one file named nrf_error.h and they are different!

Do I need to change the directory order in the preprocessor include folder list?

Is there something else I am missing?

  • Sorry ... I downloaded new nRF command line tools. Now it actually loads and runs.  I'll bang around with this for a while.

  • Hi,

    I am also getting a similar error when compiling the program. It is also complaining that NRF_SUCCESS is undefined.

    I am trying to combine ble_app_blink example and gfx example on SDK15.2 . Each program works well on its own without errors. And I am porting the GXF codes to bl_app_blink.

    I have added all the necessary files to the project, updated the sdk.config.h and also set the include paths in project options.

    My error is report inside the nrf_nvic.c file.

    So what could have gone wrong?

  • Found the problem. The GFX example doesn't use a softdevice and refers to nrf_error.h in the \components\drivers_nrf\nrf_soc_nosd\  folder.

    Whereas the ble_app_blink example uses a softdevice and refers to nrf_error.h in the \components\softdevice\common  folder.

    Inside the nrf_nvic.c file, I comment out the #include "nrf_error.h" and replace it with #include "sdk_common.h". That solved the problem. 

    Hope this helps you.

Related