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

NRF_success undeclared error

Hi,

I included pwm code in my code and its related libraries and drivers.I am getting errors like these :

  Compiling ‘nrf_log_frontend.c’
    'NRF_ERROR_INVALID_PARAM' undeclared (first use in this function); did you mean 'NRF_ERROR_IO_PENDING'?
    each undeclared identifier is reported only once for each function it appears in
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
    'NRF_ERROR_NOT_FOUND' undeclared (first use in this function); did you mean 'NRF_ERROR_IO_PENDING'?
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
  Output/ble_app_hrs_rscs_relay_pca10040_s132 Release/Obj/nrf_log_str_formatter.o does not exist.
  Compiling ‘nrf_log_str_formatter.c’
  Output/ble_app_hrs_rscs_relay_pca10040_s132 Release/Obj/app_button.o does not exist.
  Compiling ‘app_button.c’
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'NRFX_SUCCESS'?
    each undeclared identifier is reported only once for each function it appears in
    'NRF_ERROR_INVALID_PARAM' undeclared (first use in this function); did you mean 'NRFX_ERROR_INVALID_PARAM'?
    sdk_common.h
    app_button.c
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'NRFX_SUCCESS'?
    in expansion of macro 'VERIFY_SUCCESS'
    'NRF_SUCCESS' undeclared (first use in this function); did you mean 'NRFX_SUCCESS'?
  Output/ble_app_hrs_rscs_relay_pca10040_s132 Release/Obj/app_error.o does not exist.
  Compiling ‘app_error.c’
Build failed

I removed non-Softdevice paths from the user include directory and it looks like this:

Thank you

Parents
  • Have you done any modification to sdk_errors.h, and/or does sdk_errors.h have a line ``#include "nrf_error.h"'' in it?

    No i haven't done any modifications to the sdk_errors.h file and the file has the line "#include"nrf_error.h"" in it.I just removed the " <sdk root>/components/drivers_nrf/nrf_Soc_nosd" path as i was having some errors.

    Is components/libraries/util/ among the include directories? (With the correct amount of "../" in front.)

    Yes this path is included in the directories .

Reply
  • Have you done any modification to sdk_errors.h, and/or does sdk_errors.h have a line ``#include "nrf_error.h"'' in it?

    No i haven't done any modifications to the sdk_errors.h file and the file has the line "#include"nrf_error.h"" in it.I just removed the " <sdk root>/components/drivers_nrf/nrf_Soc_nosd" path as i was having some errors.

    Is components/libraries/util/ among the include directories? (With the correct amount of "../" in front.)

    Yes this path is included in the directories .

Children
  • Hi,

    What was that previous error, that you fixed by removing the nrf_soc_nosd folder from include directories?

    Can you try to do a clean build? (In the Build menu you will find "Clean Solution", which will clear all object files and intermediary files from the build process. Then if you build the project again it will not rely on previous partial builds. Sometimes with the kind of issue that you are seeing a full rebuild will make things work again.)

    Regards,
    Terje

  • Hello,

    I had also 158 errors after compiling, a lot of them with NRF_SUCCESS undefined, but also other itemsfrom the same library.

    The errors were found during compiling nrf_drv_clock.c...

    I removed the folder nrf_soc_nosd from include directories and then the compilation was successful.

Related