Skip to main content

IAR Embedded Workbench for Arm 9.70.x

Report Assert dialog box

In this section:

The Report Assert dialog box appears if you have a call to the assert function in your application source code, and the assert condition is false. In this dialog box you can choose how to proceed.

ReportAssert.png
To output the assert message as text:
  1. Add this function to your application source code:

    void __aeabi_assert(char const * msg, char const *file, int line)
    {
       printf( "%s:%d %s ‑‑ assertion failed\n", file, line, msg );
       abort();
    }
  2. An assert message is displayed.