Error compiling lpn example from BLE Mesh v5.0.0

Hello,

I am working on BLE MESH using nRF52840. I am trying to put nRF52840 into deep sleep mode. For this I am referring to lpn example in BLE Mesh which makes use of Friend Node. As per documentation, using Friend Node it is possible to put node in Deep Sleep.

My setup:
nRF SDK ver : nRF5_SDK_17.0.2_d674dde
BLE MESH ver : nrf5_SDK_for_Mesh_v5.0.0
Hardware : BT840 based custom board

I am tryting to compile lpn example from examples - nrf5_SDK_for_Mesh_v5.0.0\examples\lpn. It looks like the example needs some modification in order to compile. The example shows this error while compiling.


..\nrf5_sdk_17.0.2_d674dde\modules\nrfx\drivers\include\nrfx_power_clock.h:67:6: error: #error "This code is not supposed to be compiled when neither POWER nor CLOCK is enabled."
67 | #error "This code is not supposed to be compiled when neither POWER nor CLOCK is enabled."

POWER_ENABLED and NRFX_POWER_ENABLED is already 1 in the example code. So upon enabling macros NRF_CLOCK_ENABLED and NRFX_CLOCK_ENABLED or it shows further compilation errors. I was wondering if this is a right way to go about it.


nRF5_SDK_17.0.2_d674dde/external/segger_rtt/SEGGER_RTT_Conf.h:86:46: error: 'SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS' undeclared here (not in a function); did you mean 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'?
86 | #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS) // Max. number of down-buffers (H->T) available on this target (Default: 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../nRF5_SDK_17.0.2_d674dde/external/segger_rtt/SEGGER_RTT_Conf.h:86:46: note: in definition of macro 'SEGGER_RTT_MAX_NUM_DOWN_BUFFERS'
86 | #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (SEGGER_RTT_CONFIG_MAX_NUM_DOWN_BUFFERS) // Max. number of down-buffers (H->T) available on this target (Default: 3)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kindly let me know the changes/modification required to compile lpn example.

Best Regards,

Rajendra

Parents
  • Hi,

    The LPN example project for the nRF52840 DK builds fine in my end, using the Segger Embedded Studio project lpn_nrf52840_xxAA_s140_7_2_0.emProject.

    Your second error message mentioning nRF5_SDK_17.0.2_d674dde/external/segger_rtt/SEGGER_RTT_Conf.h is a bit suspicious, as in my project the path to that file is nrf5_SDK_for_Mesh_v5.0.0_src/external/rtt/include/SEGGER_RTT_Conf.h. What (if anything) have you done to the example, and what toolchain are you using?

    Regards,
    Terje

  • There were two different versions of SEGGER_RTT_Conf being referred, one from nrf5_SDK_for_Mesh_v5.0.0 and other from nRF5_SDK_17.0.2_d674dde. I modified my .cmake file to use SEGGER_RTT_Conf from nrf5_SDK_for_Mesh_v5.0.0. Now I am able to compile the code.

    However as the earlier error message suggested (#error "This code is not supposed to be compiled when neither POWER nor CLOCK is enabled.") I have enabled following in sdk_config.h.

    #define NRFX_CLOCK_ENABLED 1
    #define NRF_CLOCK_ENABLED 1

    Now, I will test it and check for the Friend Functionality.

    Regards,
    Rajendra

Reply
  • There were two different versions of SEGGER_RTT_Conf being referred, one from nrf5_SDK_for_Mesh_v5.0.0 and other from nRF5_SDK_17.0.2_d674dde. I modified my .cmake file to use SEGGER_RTT_Conf from nrf5_SDK_for_Mesh_v5.0.0. Now I am able to compile the code.

    However as the earlier error message suggested (#error "This code is not supposed to be compiled when neither POWER nor CLOCK is enabled.") I have enabled following in sdk_config.h.

    #define NRFX_CLOCK_ENABLED 1
    #define NRF_CLOCK_ENABLED 1

    Now, I will test it and check for the Friend Functionality.

    Regards,
    Rajendra

Children
Related