Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Logging frontend that emits messages and trace points over STM (STMESP). More...

Files

file  log_frontend_stmesp.h
 Header file for the STMESP logging frontend.

Macros

#define LOG_FRONTEND_STMESP_LOG0(_source, ...)
 Macro for handling a turbo log message with no arguments.
#define LOG_FRONTEND_STMESP_LOG1(_source, ...)
 Macro for handling a turbo log message with one argument.

Functions

int log_frontend_stmesp_etr_ready (void)
 Notify frontend that ETR/STM is ready.
void log_frontend_stmesp_pre_sleep (void)
 Hook to be called before going to sleep.
void log_frontend_stmesp_dummy_write (void)
 Perform a dummy write to STMESP.
static void log_frontend_stmesp_tp (uint16_t x)
 Trace point.
static void log_frontend_stmesp_tp_d32 (uint16_t x, uint32_t d)
 Trace point with 32 bit data.
void log_frontend_stmesp_log0 (const void *source, uint32_t x)
 Function called for log message with no arguments when turbo logging is enabled.
void log_frontend_stmesp_log1 (const void *source, uint32_t x, uint32_t arg)
 Function called for log message with one argument when turbo logging is enabled.

Detailed Description

Logging frontend that emits messages and trace points over STM (STMESP).

Macro Definition Documentation

◆ LOG_FRONTEND_STMESP_LOG0

#define LOG_FRONTEND_STMESP_LOG0 ( _source,
... )

#include <zephyr/logging/log_frontend_stmesp.h>

Value:
do { \
static const char _str[] __in_section(_log_stmesp_str, static, __COUNTER__) \
__used __noasan __aligned(sizeof(uint32_t)) = GET_ARG_N(1, __VA_ARGS__); \
static const char *str_ptr __in_section(_log_stmesp_ptr, static, __COUNTER__) \
__used __noasan = _str; \
uint32_t _idx = \
((uintptr_t)&str_ptr - (uintptr_t)TYPE_SECTION_START(log_stmesp_ptr)) / \
sizeof(void *); \
log_frontend_stmesp_log0(_source, _idx); \
} while (0)
#define TYPE_SECTION_START(secname)
iterable section start symbol for a generic type
Definition iterable_sections.h:61
#define GET_ARG_N(N,...)
Get nth argument from argument list.
Definition util_macro.h:422
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105

Macro for handling a turbo log message with no arguments.

Parameters
_sourcePointer to the source structure.
...String.

◆ LOG_FRONTEND_STMESP_LOG1

#define LOG_FRONTEND_STMESP_LOG1 ( _source,
... )

#include <zephyr/logging/log_frontend_stmesp.h>

Value:
do { \
static const char _str[] __in_section(_log_stmesp_str, static, __COUNTER__) \
__used __noasan __aligned(sizeof(uint32_t)) = GET_ARG_N(1, __VA_ARGS__); \
static const char *str_ptr __in_section(_log_stmesp_ptr, static, __COUNTER__) \
__used __noasan = _str; \
uint32_t _idx = \
((uintptr_t)&str_ptr - (uintptr_t)TYPE_SECTION_START(log_stmesp_ptr)) / \
sizeof(void *); \
log_frontend_stmesp_log1(_source, _idx, (uintptr_t)(GET_ARG_N(2, __VA_ARGS__))); \
} while (0)

Macro for handling a turbo log message with one argument.

Parameters
_sourcePointer to the source structure.
...String with one numeric argument.

Function Documentation

◆ log_frontend_stmesp_dummy_write()

void log_frontend_stmesp_dummy_write ( void )

#include <zephyr/logging/log_frontend_stmesp.h>

Perform a dummy write to STMESP.

It can be used to force flushing STM data.

◆ log_frontend_stmesp_etr_ready()

int log_frontend_stmesp_etr_ready ( void )

#include <zephyr/logging/log_frontend_stmesp.h>

Notify frontend that ETR/STM is ready.

Log frontend optionally dumps buffered data and start to write to the STM stimulus port.

Note
Function is applicable only for the domain that performs initial ETR/STM setup.
Return values
0on success.
-EIOif there was an internal failure.

◆ log_frontend_stmesp_log0()

void log_frontend_stmesp_log0 ( const void * source,
uint32_t x )

#include <zephyr/logging/log_frontend_stmesp.h>

Function called for log message with no arguments when turbo logging is enabled.

Parameters
sourcePointer to the source structure.
xIndex of the string used for the log message.

◆ log_frontend_stmesp_log1()

void log_frontend_stmesp_log1 ( const void * source,
uint32_t x,
uint32_t arg )

#include <zephyr/logging/log_frontend_stmesp.h>

Function called for log message with one argument when turbo logging is enabled.

Parameters
sourcePointer to the source structure.
xIndex of the string used for the log message.
argArgument.

◆ log_frontend_stmesp_pre_sleep()

void log_frontend_stmesp_pre_sleep ( void )

#include <zephyr/logging/log_frontend_stmesp.h>

Hook to be called before going to sleep.

Hook writes dummy data to the STM Stimulus Port to ensure that all logging data is flushed.

◆ log_frontend_stmesp_tp()

void log_frontend_stmesp_tp ( uint16_t x)
inlinestatic

#include <zephyr/logging/log_frontend_stmesp.h>

Trace point.

Write a trace point information using STM. Number of unique trace points is limited to 32768 - CONFIG_LOG_FRONTEND_STMESP_TP_CHAN_BASE per core.

Parameters
xTrace point ID.

◆ log_frontend_stmesp_tp_d32()

void log_frontend_stmesp_tp_d32 ( uint16_t x,
uint32_t d )
inlinestatic

#include <zephyr/logging/log_frontend_stmesp.h>

Trace point with 32 bit data.

Write a trace point information using STM. Number of unique trace points is limited to 32768 - CONFIG_LOG_FRONTEND_STMESP_TP_CHAN_BASE per core.

Parameters
xTrace point ID.
dData. 32 bit word.