41 const char* failedexpr);
43 #if !defined(TRACE) && !defined(OS_USE_SEMIHOSTING_SYSCALLS) 45 __attribute__((noreturn))
47 int line __attribute__((unused)),
48 const char* func __attribute__((unused)),
49 const char* failedexpr __attribute__((unused)))
56 __attribute__((noreturn))
58 const
char* failedexpr)
72 #elif defined(OS_USE_SEMIHOSTING_SYSCALLS) 74 printf (
"assertion \"%s\" failed\n", failedexpr);
75 printf (
"file: \"%s\"\n", file);
76 printf (
"line: %d\n", line);
79 printf (
"function: %s\n", func);
104 #pragma GCC diagnostic push 105 #pragma GCC diagnostic ignored "-Wunused-parameter" 109 __attribute__((noreturn))
110 assert_failed (uint8_t* file, uint32_t line)
114 trace_printf (
"assert_param() failed: file \"%s\", line %d\n", file, line);
116 #elif defined(OS_USE_SEMIHOSTING_SYSCALLS) 118 printf (
"assert_param() failed: file \"%s\", line %d\n", file, (
int)line);
126 #pragma GCC diagnostic pop
void assert_failed(uint8_t *file, uint32_t line)
int printf(const char *format,...)
Write a formatted string to the trace device.
int trace_printf(const char *format,...)
void __assert_func(const char *file, int line, const char *func, const char *failedexpr)