14#pragma clang diagnostic ignored "-Wempty-translation-unit"
19#if defined(__ARM_EABI__)
25#if defined(OS_USE_OS_APP_CONFIG_H)
26#include <cmsis-plus/os-app-config.h>
29#if defined(OS_USE_TRACE_ITM)
35#include <cmsis_device.h>
54#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
65#if !defined(OS_INTEGER_TRACE_ITM_STIMULUS_PORT)
66#define OS_INTEGER_TRACE_ITM_STIMULUS_PORT (0)
70 write (
const void* buf, std::size_t nbyte)
72 if (buf ==
nullptr || nbyte == 0)
77 const char* cbuf = (
const char*) buf;
79 for (
size_t i = 0; i < nbyte; i++)
82 if (((ITM->TCR & ITM_TCR_ITMENA_Msk) == 0)
99 return (ssize_t) nbyte;
104#error "ITM available only on ARCH 7M"
#define OS_INTEGER_TRACE_ITM_STIMULUS_PORT
Define the ITM stimulus port used for the trace messages.
ssize_t write(const void *buf, std::size_t nbyte)
Write the given number of bytes to the trace output channel.