19#if defined(OS_USE_OS_APP_CONFIG_H)
20#include <cmsis-plus/os-app-config.h>
28#pragma GCC diagnostic push
30#pragma clang diagnostic ignored "-Wreserved-identifier"
32#pragma GCC diagnostic ignored "-Wredundant-decls"
36 const char* failedexpr);
37#pragma GCC diagnostic pop
39#if !defined(TRACE) && !defined(OS_USE_SEMIHOSTING_SYSCALLS)
40void __attribute__ ((noreturn))
42 int line __attribute__ ((unused)),
43 const char* func __attribute__ ((unused)),
44 const char* failedexpr __attribute__ ((unused)))
50void __attribute__ ((noreturn))
52 const
char* failedexpr)
77#elif defined(OS_USE_SEMIHOSTING_SYSCALLS)
79 printf (
"assertion \"%s\" failed\n", failedexpr);
80 printf (
"file: \"%s\"\n", file);
81 printf (
"line: %d\n", line);
84 printf (
"function: %s\n", func);
90 printf (
"this_thread: %s @%p\n",
103#if defined(OS_INCLUDE_ASSERT_FAILED)
118assert_failed (uint8_t* file, uint32_t line);
120#pragma GCC diagnostic push
121#if defined(__clang__)
122#pragma clang diagnostic ignored "-Wunused-parameter"
123#elif defined(__GNUC__)
124#pragma GCC diagnostic ignored "-Wunused-parameter"
128void __attribute__ ((noreturn))
129assert_failed (uint8_t* file, uint32_t line)
133 trace_printf (
"assert_param() failed: file \"%s\", line %d\n", file, line);
136#elif defined(OS_USE_SEMIHOSTING_SYSCALLS)
138 printf (
"assert_param() failed: file \"%s\", line %d\n", file, (
int)line);
146#pragma GCC diagnostic pop
void __assert_func(const char *file, int line, const char *func, const char *failedexpr)
int printf(const char *format,...)
Write a formatted string to the trace device.
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,...)