This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRFX_ASSERT

Hi

I'm new on zephyr and nRF9160.

In the nrfx source are lots of NRFX_ASSERT() macros.

This macro checks a condition and thrown a exception.

Normaly we use asserts in debug code.

In release code we set assert() to an empty macro for speed and codesize.

How can I set NRFX_ASSERT() to an empty macro for nrfx code?

Parents Reply
  • __ASSERT() should also be set to an empty macro by "CONFIG_ASSERT=n", are you not seeing that behavior?

    We have some release and debug configuations for the nrf desktop sample, which may be useful.
    They can be found in the folders at nrf/applications/nrf_desktop/configuration. Seems to mostly be asserts, logging and error handling.
    Keep in mind that the configs starting with CONFIG_DESKTOP_* are specific to the sample.

Children
Related