Skip to main content

Configuration

Configuration macros. More...

Macro Definitions Index

#defineMICRO_OS_PLUS_DIAG_TRACE_ENABLED

Enables the output of trace messages. More...

#defineMICRO_OS_PLUS_DIAG_TRACE_PRINTF_BUFFER_ARRAY_SIZE_INTEGER   (200)

The size, in bytes, of the stack buffer used to format trace messages. More...

Description

Configuration macros.

The µOS++ Tracing Infrastructure library uses several preprocessor macros to enable it and to configure various options.

Macro Definitions

MICRO_OS_PLUS_DIAG_TRACE_ENABLED

#define MICRO_OS_PLUS_DIAG_TRACE_ENABLED

Enables the output of trace messages.

The macro is intended to be defined by the user, for debug builds, typically in the library's own micro-os-plus/diag/trace-defines.h configuration file or the project micro-os-plus/project-config.h configuration file.

When MICRO_OS_PLUS_DIAG_TRACE_ENABLED is defined, the C++ and C trace functions are compiled to their full implementations, declared in cpp-api.h and c-api.h, which forward all calls to micro_os_plus::trace::detail::tracer<micro_os_plus::trace::detail::implementation>.

When it is not defined, which is the usual case for release builds, all trace functions are inlined to empty (or trivial pass-through) bodies. This approach allows trace calls to remain in the code unconditionally, without being wrapped in #if defined(MICRO_OS_PLUS_DIAG_TRACE_ENABLED) guards, while still being fully eliminated from the generated binary.

Definition at line 51 of file trace.h.

51#define MICRO_OS_PLUS_DIAG_TRACE_ENABLED

MICRO_OS_PLUS_DIAG_TRACE_PRINTF_BUFFER_ARRAY_SIZE_INTEGER

#define MICRO_OS_PLUS_DIAG_TRACE_PRINTF_BUFFER_ARRAY_SIZE_INTEGER   (200)

The size, in bytes, of the stack buffer used to format trace messages.

This buffer is allocated on the stack by tracer<T>::vprintf() to hold the message formatted by vsnprintf() before it is forwarded to the trace channel write() implementation. Output that exceeds this size is silently truncated.

The definition below only supplies the default value (200 bytes), used when the macro has not already been defined; the actual value may be overridden by the user, typically in the library's own micro-os-plus/diag/trace-defines.h configuration file or the project micro-os-plus/project-config.h configuration file.

Definition at line 55 of file trace.h.

55#define MICRO_OS_PLUS_DIAG_TRACE_PRINTF_BUFFER_ARRAY_SIZE_INTEGER (200)

Referenced by micro_os_plus::trace::detail::tracer< T >::vprintf.


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.17.0.