Skip to main content

IAR Embedded Workbench for Arm 10.10.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_dlg_Qt_01.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.