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
  • Hi,

    The missing defines are found in nrf_error.h, which can be found at <sdk root>/components/drivers_nrf/nrf_Soc_nosd/nrf_error.h, or at <sdk_root>/components/softdevice/s132/headers/nrf_error.h (for the s132 SoftDevice.)

    If the error is that the folder containing the nrf_error.h file is not among the include paths for the project I would have expected an error stating "nrf_error.h" is not found. Since that is not the case, it looks more like nrf_error.h is not included from nrf_log_frontend.c and the other c files being compiled. Which is strange, as nrf_log_frontend.c includes sdk_common.h, which includes sdk_errors.h, which includes nrf_error.h. (And sdk_errors.h seems to be included, ref. the suggestions such as "did you mean 'NRF_ERROR_IO_PENDING'".)

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

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

    Regards,
    Terje

Reply
  • Hi,

    The missing defines are found in nrf_error.h, which can be found at <sdk root>/components/drivers_nrf/nrf_Soc_nosd/nrf_error.h, or at <sdk_root>/components/softdevice/s132/headers/nrf_error.h (for the s132 SoftDevice.)

    If the error is that the folder containing the nrf_error.h file is not among the include paths for the project I would have expected an error stating "nrf_error.h" is not found. Since that is not the case, it looks more like nrf_error.h is not included from nrf_log_frontend.c and the other c files being compiled. Which is strange, as nrf_log_frontend.c includes sdk_common.h, which includes sdk_errors.h, which includes nrf_error.h. (And sdk_errors.h seems to be included, ref. the suggestions such as "did you mean 'NRF_ERROR_IO_PENDING'".)

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

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

    Regards,
    Terje

Children
No Data
Related