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
  • Hi

    I don't know what a child image is.

    I take the blinky sample, add CONFIG_ASSERT=n and CONFIG_FORCE_NO_ASSERT=y to prj.conf and build with SES.

    Attachted is the sample.

    In Debugger I search for __ASSERT() and found code behind the macro. (ex. fault.c line 335)

    When I build from command line I get

    CMake Warning at F:/Programme/Nordic/v1.6.0/zephyr/CMakeLists.txt:1607 (message):
    __ASSERT() statements are globally ENABLED

    3201.blinky.zip

    Hope You find a solution

Children
Related