Assertion management module.
More...
Defines |
|
#define | LINE_NB ((TRACE_FILE_ID << 20) + (__LINE__ & 0xfffff)) |
| | Line number: Include file id if trace is enabled.
|
|
#define | ASSERT(type, cond) dbg_assert_##type("", "", 0) |
| | Macro defining the format of the assertion calls.
|
|
#define | ASSERT_ERR(cond) |
| | Assertions showing a critical error that could require a full system reset.
|
|
#define | ASSERT_ERR2(cond, param0, param1) |
| | Assertions showing a critical error that could require a full system reset.
|
|
#define | ASSERT_WARN(cond) |
| | Assertions showing a non-critical problem that has to be fixed by the SW.
|
|
#define | ASSERT_REC(cond) ASSERT_ERR(cond) |
| | Assertions that trigger the automatic recovery mechanism and return void.
|
|
#define | ASSERT_REC_VAL(cond, ret) ASSERT_ERR(cond) |
| | Assertions that trigger the automatic recovery mechanism and return a value.
|
|
#define | ASSERT_REC_NO_RET(cond) ASSERT_ERR(cond) |
| | Assertions that trigger the automatic recovery mechanism and do not return.
|
Functions |
| void | dbg_assert_rec (const char *condition, const char *file, int line) |
| | Print the assertion error reason and trigger the recovery procedure.
|
| void | dbg_assert_err (const char *condition, const char *file, int line) |
| | Print the assertion error reason and loop forever.
|
| void | dbg_assert_warn (const char *condition, const char *file, int line) |
| | Print the assertion warning reason.
|
| void | dbg_force_trigger (const char *msg) |
| | Force the trigger of the logic analyzer.
|
Variables |
|
int | dbg_assert_block = 1 |
| | Whether to enter endless loop after assert.
|
Detailed Description
Assertion management module.
Function Documentation
| void dbg_assert_err |
( |
const char * |
condition, |
|
|
const char * |
file, |
|
|
int |
line | |
|
) |
| | |
Print the assertion error reason and loop forever.
- Parameters:
-
| [in] | condition | C string containing the condition. |
| [in] | file | C string containing file where the assertion is located. |
| [in] | line | Line number in the file where the assertion is located. |
| void dbg_assert_rec |
( |
const char * |
condition, |
|
|
const char * |
file, |
|
|
int |
line | |
|
) |
| | |
Print the assertion error reason and trigger the recovery procedure.
- Parameters:
-
| [in] | condition | C string containing the condition. |
| [in] | file | C string containing file where the assertion is located. |
| [in] | line | Line number in the file where the assertion is located. |
| void dbg_assert_warn |
( |
const char * |
condition, |
|
|
const char * |
file, |
|
|
int |
line | |
|
) |
| | |
Print the assertion warning reason.
- Parameters:
-
| [in] | condition | C string containing the condition. |
| [in] | file | C string containing file where the assertion is located. |
| [in] | line | Line number in the file where the assertion is located. |
| void dbg_force_trigger |
( |
const char * |
msg |
) |
|
Force the trigger of the logic analyzer.
- Parameters:
-
| [in] | msg | Error condition that caused the trigger to be forced. |
Referenced by mm_dbg_trigger_req_handler().