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); did you mean 'EXIT_SUCCESS'?

Hello,

I merged the two projects usbd_cdc_acm_pca10056 (A) and ble_app_hids_mouse_pca10056_s140 (B) by copying all additional contents from A's flash_placement.xml into B's. Also, I added all .c files from A to B that were not present in B anyway.

I then merged A's sdk_config.h into B's and included all the additional user build paths from A into B that were not present in B's build paths (by removing duplicates).

I used the search function and my error seems not to be produced by including ../../../../../../components/drivers_nrf/nrf_soc_nosd as I removed that include already manually. The ../../../../../../components/softdevice/s140/headers include is still present.

When building, I get the following errors:


Building ‘ble_app_hids_mouse_pca10056_s140’ from solution ‘ble_app_hids_mouse_pca10056_s140’ in configuration ‘Release’
Compiling ‘nrfx_gpiote.c’
Compiling ‘nrfx_uart.c’
Compiling ‘nrfx_uarte.c’
Compiling ‘nrf_nvic.c’
'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
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_NULL' undeclared (first use in this function)
'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'?
'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
'NRF_ERROR_NULL' undeclared (first use in this function)
'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'?
Compiling ‘nrf_soc.c’
'NRF_SUCCESS' undeclared (first use in this function); did you mean 'EXIT_SUCCESS'?
each undeclared identifier is reported only once for each function it appears in
Compiling ‘nrfx_power.c’
Compiling ‘nrf_drv_power.c’
Compiling ‘nrfx_systick.c’
Build failed

I'm planning to run that on the nRF52840 DK and later port it to the nRF52840 Dongle.

Please help me Slight smile

  • I can confirm that deleting those files solved the building failure. However, after that I've run into Linker errors like that:

    cyclic memory section dependency with section .cli_sorted_cmd_ptrs_run

    I was able to solve them by restoring the original state of the projects flash_placement.xml (of the project that was using softdevice).

    Thank you again Karl, you helped me alot.

  • ny_quist said:
    I can confirm that deleting those files solved the building failure.

     I am glad to hear that the issue is resolved on your end as well.

    ny_quist said:
    I was able to solve them by restoring the original state of the projects flash_placement.xml (of the project that was using softdevice).

    That's great, well done!
    When a SoftDevice is added/removed, the flash placements and memory_map have to be adjusted - fortunately, you may then often just look to similar examples from the SDK, to see how you may go about changing it - just like you did!

    ny_quist said:
    Thank you again Karl, you helped me alot.

    I am happy to hear that, ny_quist! :) 

    Please do not hesitate to open a new ticket if you should encounter any issues or questions in the future.

    Good luck with your development!

    Best regards,
    Karl

Related