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

'NRF_SUCCESS' undeclared (first use in this function)

Hello!

It's the first time using Nordic devices so i´m doing some SDK examples and trying to merge them. I'm using SEGGER Embedded Studio. Right now i´m using ble_app_blinky and tried to merge pwm_library. I already added the existing files from pwm_library to ble_app_blinky and i get the 'NRF_SUCCESS' undeclared (first use in this function).

I went to User Include Directories and added the addresses for every file i added and still have the same problem. For example,the file app_button.c has #include "app_error.h" and i see the error there.

Any idea what could be happening?

Thanks!

Parents Reply
  • Hi,

    The problem is that you have ../../../../../../components/drivers_nrf/nrf_soc_nosd in your projects include path. This contain a variant of nrf_error.h that is only to be used without a SoftDevice. The correct SoftDevice include directory (../../../../../../components/softdevice/s132/headers) is also included later  in the list. These should never be used in the same project, and you should always use the variant which matched your SoftDevice.

    You should remove the nrf_soc_nosd include  from the project wide Common configuration, as well as for the single file (nrf_nvic.c) where you have edited it. Make sure you use inherited configuration.

Children
Related