20#if defined(OS_USE_OS_APP_CONFIG_H)
21#include <cmsis-plus/os-app-config.h>
29#pragma GCC diagnostic push
31#pragma clang diagnostic ignored "-Wreserved-identifier"
33#pragma GCC diagnostic ignored "-Wredundant-decls"
37 const char* failedexpr);
38#pragma GCC diagnostic pop
40#if !defined(TRACE) && !defined(OS_USE_SEMIHOSTING_SYSCALLS)
42__attribute__((noreturn))
44 int line __attribute__((unused)),
45 const char* func __attribute__((unused)),
46 const char* failedexpr __attribute__((unused)))
53__attribute__((noreturn))
55 const
char* failedexpr)
79#elif defined(OS_USE_SEMIHOSTING_SYSCALLS)
81 printf (
"assertion \"%s\" failed\n", failedexpr);
82 printf (
"file: \"%s\"\n", file);
83 printf (
"line: %d\n", line);
86 printf (
"function: %s\n", func);
105#if defined(OS_INCLUDE_ASSERT_FAILED)
120assert_failed (uint8_t* file, uint32_t line);
122#pragma GCC diagnostic push
123#if defined(__clang__)
124#pragma clang diagnostic ignored "-Wunused-parameter"
125#elif defined(__GNUC__)
126#pragma GCC diagnostic ignored "-Wunused-parameter"
131__attribute__((noreturn))
132assert_failed (uint8_t* file, uint32_t line)
136 trace_printf (
"assert_param() failed: file \"%s\", line %d\n", file, line);
139#elif defined(OS_USE_SEMIHOSTING_SYSCALLS)
141 printf (
"assert_param() failed: file \"%s\", line %d\n", file, (
int)line);
149#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,...)