30#include <cmsis-plus/os-app-config.h>
37#ifndef OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE
38#define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE (200)
49 void __attribute__((weak))
59 ssize_t __attribute__((weak))
60 write (const
void* buf __attribute__((unused)),
std::
size_t nbyte)
62 return static_cast<ssize_t
> (nbyte);
65 void __attribute__((weak))
73 int __attribute__((weak))
77 va_start(args, format);
79 int ret =
vprintf (format, args);
85 int __attribute__((weak))
95#pragma GCC diagnostic push
96#pragma GCC diagnostic ignored "-Wformat-nonliteral"
97 int ret = ::vsnprintf (buf,
sizeof(buf), format, args);
98#pragma GCC diagnostic pop
102 ret =
static_cast<int> (
write (buf,
static_cast<size_t> (ret)));
107 int __attribute__((weak))
110 int ret =
static_cast<int> (
write (s, strlen (s)));
113 ret =
static_cast<int> (
write (
"\n", 1));
125 int __attribute__((weak))
128 int ret =
static_cast<int> (
write (
reinterpret_cast<const char*
> (&c), 1));
139 void __attribute__((weak))
142 printf (
"main(argc=%d, argv=[", argc);
143 for (
int i = 0; i < argc; ++i)
149 printf (
"\"%s\"", argv[i]);
164void __attribute__((weak))
170ssize_t __attribute__((weak))
176void __attribute__((weak))
184#if defined(__ARM_EABI__)
191int __attribute__((weak, alias (
"_ZN2os5trace6printfEPKcz")))
194int __attribute__((weak, alias ("_ZN2os5trace7vprintfEPKcSt9__va_list")))
197int __attribute__((weak, alias("_ZN2os5trace4putsEPKc")))
200int __attribute__((weak, alias("_ZN2os5trace7putcharEi")))
203void __attribute__((weak, alias("_ZN2os5trace9dump_argsEiPPc")))
215 va_start(args, format);
int puts(const char *s)
Write the string and a line terminator to the trace device.
int vprintf(const char *format, std::va_list args)
Write a formatted variable arguments list to the trace device.
int printf(const char *format,...)
Write a formatted string to the trace device.
int putchar(int c)
Write the single character to the trace device.
void dump_args(int argc, char *argv[])
Write the argv[] array to the trace device.
ssize_t write(const void *buf, std::size_t nbyte)
Write the given number of bytes to the trace output channel.
void flush(void)
Flush the output.
#define OS_INTEGER_TRACE_PRINTF_TMP_ARRAY_SIZE
int trace_vprintf(const char *format, va_list args)
void trace_initialize(void)
void trace_dump_args(int argc, char *argv[])
ssize_t trace_write(const void *buf, std::size_t nbyte)
int trace_printf(const char *format,...)
int trace_puts(const char *s)