Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK 15.1 missing bracket

There is missing bracket in /components/ble/peer_manager/nrf_ble_lesc.c:103

#elif defined((NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 0)

As a result for example ble_app_hrs example can not build.

Parents
  • Hi, I fixed it with :

    #if NRF_MODULE_ENABLED(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) /*defined(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 1)*/
    // Do nothing. RNG is initialized with nrf_crypto_init call.
    #elif !NRF_MODULE_ENABLED(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) /*defined((NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 0)*/
    // Initialize the RNG.
    err_code = nrf_crypto_rng_init(NULL, NULL);
    if (err_code != NRF_SUCCESS)
    {
    NRF_LOG_ERROR("nrf_crypto_rng_init() returned error 0x%x.", err_code);
    return err_code;
    }
    #else
    #error Invalid sdk_config.h (does not contain NRF_CRYPTO_RNG_AUTO_INIT_ENABLED)
    #endif // defined(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 1)

Reply
  • Hi, I fixed it with :

    #if NRF_MODULE_ENABLED(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) /*defined(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 1)*/
    // Do nothing. RNG is initialized with nrf_crypto_init call.
    #elif !NRF_MODULE_ENABLED(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) /*defined((NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 0)*/
    // Initialize the RNG.
    err_code = nrf_crypto_rng_init(NULL, NULL);
    if (err_code != NRF_SUCCESS)
    {
    NRF_LOG_ERROR("nrf_crypto_rng_init() returned error 0x%x.", err_code);
    return err_code;
    }
    #else
    #error Invalid sdk_config.h (does not contain NRF_CRYPTO_RNG_AUTO_INIT_ENABLED)
    #endif // defined(NRF_CRYPTO_RNG_AUTO_INIT_ENABLED) && (NRF_CRYPTO_RNG_AUTO_INIT_ENABLED == 1)

Children
Related