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

app_util.h:118:41: error: static assertion failed: "unspecified message"

Hi,

I am trying to use random number generator as implemented in ".../examples/peripheral/rng" from SDK14.2 in a project but receiving compile problems as shown below. ble_app_hrs_rscs_relay is used as project template. I enabled RNG_ENABLED in sdk_config.h.

My environment: nRF5_SDK_14.2, arm-gcc with Makefile, nRF52-DK(pca10040)

I tried both gcc-arm-none-eabi-6-2017-q2 and gcc-arm-none-eabi-7-2017-q4-major

Compiling file: nrf_drv_rng.c
In file included from ../../../../../../components/libraries/util/sdk_common.h:61:0,
from ../../../../../../components/drivers_nrf/rng/nrf_drv_rng.c:40:
../../../../../../components/libraries/util/app_util.h:118:41: error: static assertion failed: "unspecified message"
#define STATIC_ASSERT_SIMPLE(EXPR) _Static_assert(EXPR, "unspecified message")
^
../../../../../../components/libraries/util/app_util.h:140:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
#define _SELECT_ASSERT_FUNC(x, EXPR, MSG, ASSERT_MACRO, ...) ASSERT_MACRO
^~~~~~~~~~~~
../../../../../../components/libraries/util/app_util.h:157:25: note: in expansion of macro 'STATIC_ASSERT_SIMPLE'
STATIC_ASSERT_SIMPLE(__VA_ARGS__))
^~~~~~~~~~~~~~~~~~~~
../../../../../../components/drivers_nrf/rng/nrf_drv_rng.c:87:5: note: in expansion of macro 'STATIC_ASSERT'
STATIC_ASSERT(RNG_CONFIG_POOL_SIZE == SD_RAND_POOL_SIZE);
^~~~~~~~~~~~~
make: *** [../../../../../../components/toolchain/gcc/Makefile.common:272: _build/nrf52832_xxaa/nrf_drv_rng.c.o] Error 1
make: *** Waiting for unfinished jobs....

Related