42 const char* failedexpr);
44#if !defined(TRACE) && !defined(OS_USE_SEMIHOSTING_SYSCALLS)
46__attribute__((noreturn))
48 int line __attribute__((unused)),
49 const char* func __attribute__((unused)),
50 const char* failedexpr __attribute__((unused)))
57__attribute__((noreturn))
59 const
char* failedexpr)
83#elif defined(OS_USE_SEMIHOSTING_SYSCALLS)
85 printf (
"assertion \"%s\" failed\n", failedexpr);
86 printf (
"file: \"%s\"\n", file);
87 printf (
"line: %d\n", line);
90 printf (
"function: %s\n", func);
124#pragma GCC diagnostic push
125#pragma GCC diagnostic ignored "-Wunused-parameter"
129__attribute__((noreturn))
134 trace_printf (
"assert_param() failed: file \"%s\", line %d\n", file, line);
137#elif defined(OS_USE_SEMIHOSTING_SYSCALLS)
139 printf (
"assert_param() failed: file \"%s\", line %d\n", file, (
int)line);
147#pragma GCC diagnostic pop
void assert_failed(uint8_t *file, uint32_t line)
void __assert_func(const char *file, int line, const char *func, const char *failedexpr)
bool os_irq_in_handler_mode(void)
Check if the CPU is in handler mode.
os_irq_state_t os_irq_critical_enter(void)
Enter an interrupts critical section.
const char * os_thread_get_name(os_thread_t *thread)
Get the thread name.
os_thread_t * os_this_thread(void)
Get the current running thread.
int trace_printf(const char *format,...)