Data Structures | Macros | Typedefs | Enumerations | Functions
LogSinkITM.h File Reference

Detailed Description

PRELIMINARY LogSinkITM interface


WARNING These APIs are PRELIMINARY, and subject to change in the next few months.

The LogSinkITM module is a sink that can be used in conjunction with the Log.h API. The API defined in this file should not be used directly, but is made available to the Logging framework and used as a transport layer for Log.h

To use the ITM sink, ensure that the correct library for your device is linked in and include this header file as follows:

Additionally, LogSinkITM_init must be called before LogSinkITM can be used.

// Initialize ITM sink

This module implements two functions that are required by the Log API:

Whenever a log-statement is invoked, that uses LogSinkITM as its sink, the functions above are ultimately invoked.

Overview

LogSinkITM is a sink/transport layer that is able to output log-statements over ITM. It uses the ITM driver to stream data out onto a user-selectable pin, which can be received and processed by a host-side tool. For more information about the host-side tool, see tools/log/tiutils. For more information about the Log API, see the Log documentation

ITM Channels

LogSinkITM uses certain channels for different purposes. Seperate channels are used for data transfer, time synchronization, etc. For a complete overview, refer to LogSinkITM_StimulusPorts

ITM Timestamps

Timestamps are automatically generated by the ITM hardware, and a synchronization timestamp is sent over the time-sync channel when the ITM sink is initiated. The timestamp is taken from the RTC, but the format depends on the device. Refer to TimestampP.h for implementation details


#include <stdint.h>
#include <ti/log/Log.h>
Include dependency graph for LogSinkITM.h:

Go to the source code of this file.

Data Structures

struct  LogSinkITM_Instance
 

Macros

#define Log_TI_LOG_SINK_ITM_VERSION   0.1.0
 
#define Log_SINK_ITM_DEFINE()   LogSinkITM_Instance LogSinkITM_singletonConfig = {.serial = 0}
 
#define Log_SINK_ITM_USE()   extern LogSinkITM_Instance LogSinkITM_singletonConfig
 
#define Log_MODULE_INIT_SINK_ITM(name, _levels)
 

Typedefs

typedef enum LogSinkITM_ControlWord LogSinkITM_ControlWord
 
typedef struct LogSinkITM_Instance LogSinkITM_Instance
 
typedef LogSinkITM_InstanceLogSinkITM_Handle
 

Enumerations

enum  LogSinkITM_StimulusPorts {
  LogSinkITM_STIM_RAW0 = 0, LogSinkITM_STIM_RAW1, LogSinkITM_STIM_RAW2, LogSinkITM_STIM_RAW3,
  LogSinkITM_STIM_RAW4, LogSinkITM_STIM_RAW5, LogSinkITM_STIM_RAW6, LogSinkITM_STIM_RAW7,
  LogSinkITM_STIM_RAW8, LogSinkITM_STIM_RAW9, LogSinkITM_STIM_RAW10, LogSinkITM_STIM_RAW11,
  LogSinkITM_STIM_RAW12, LogSinkITM_STIM_RAW13, LogSinkITM_STIM_RAW14, LogSinkITM_STIM_RAW15,
  LogSinkITM_STIM_RESV16 = 16, LogSinkITM_STIM_RESV17, LogSinkITM_STIM_RESV18, LogSinkITM_STIM_RESV19,
  LogSinkITM_STIM_RESV20, LogSinkITM_STIM_RESV21, LogSinkITM_STIM_RESV22, LogSinkITM_STIM_RESV23,
  LogSinkITM_STIM_RESV24, LogSinkITM_STIM_RESV25, LogSinkITM_STIM_RESV26, LogSinkITM_STIM_RESV27,
  LogSinkITM_STIM_TRACE, LogSinkITM_STIM_HEADER, LogSinkITM_STIM_TIME_SYNC, LogSinkITM_STIM_INFO
}
 
enum  LogSinkITM_ControlWord { LogSinkITM_Info_Timing = 3 }
 

Functions

void LogSinkITM_init (void)
 
void LogSinkITM_finalize (void)
 
void ti_log_LogSinkITM_printf (const Log_Module *handle, uint32_t header, uint32_t index, uint32_t numArgs,...)
 
void ti_log_LogSinkITM_buf (const Log_Module *handle, uint32_t header, uint32_t index, uint8_t *data, size_t size)
 
 _Log_DEFINE_LOG_VERSION (LogSinkITM, 0.1.0)
 

Macro Definition Documentation

§ Log_TI_LOG_SINK_ITM_VERSION

#define Log_TI_LOG_SINK_ITM_VERSION   0.1.0

§ Log_SINK_ITM_DEFINE

#define Log_SINK_ITM_DEFINE ( )    LogSinkITM_Instance LogSinkITM_singletonConfig = {.serial = 0}

§ Log_SINK_ITM_USE

#define Log_SINK_ITM_USE ( )    extern LogSinkITM_Instance LogSinkITM_singletonConfig

§ Log_MODULE_INIT_SINK_ITM

#define Log_MODULE_INIT_SINK_ITM (   name,
  _levels 
)
Value:
{ \
.sinkConfig = &LogSinkITM_singletonConfig, .printf = ti_log_LogSinkITM_printf, .buf = ti_log_LogSinkITM_buf, \
.levels = _levels, \
}
void ti_log_LogSinkITM_printf(const Log_Module *handle, uint32_t header, uint32_t index, uint32_t numArgs,...)
void ti_log_LogSinkITM_buf(const Log_Module *handle, uint32_t header, uint32_t index, uint8_t *data, size_t size)

Typedef Documentation

§ LogSinkITM_ControlWord

§ LogSinkITM_Instance

§ LogSinkITM_Handle

Enumeration Type Documentation

§ LogSinkITM_StimulusPorts

Enumerator
LogSinkITM_STIM_RAW0 

Port 0. Reserved for future use.

LogSinkITM_STIM_RAW1 

Port 1. Reserved for future use.

LogSinkITM_STIM_RAW2 

Port 2. Reserved for future use.

LogSinkITM_STIM_RAW3 

Port 3. Reserved for future use.

LogSinkITM_STIM_RAW4 

Port 4. Reserved for future use.

LogSinkITM_STIM_RAW5 

Port 5. Reserved for future use.

LogSinkITM_STIM_RAW6 

Port 6. Reserved for future use.

LogSinkITM_STIM_RAW7 

Port 7. Reserved for future use.

LogSinkITM_STIM_RAW8 

Port 8. Reserved for future use.

LogSinkITM_STIM_RAW9 

Port 9. Reserved for future use.

LogSinkITM_STIM_RAW10 

Port 10. Reserved for future use.

LogSinkITM_STIM_RAW11 

Port 11. Reserved for logger time sync.

LogSinkITM_STIM_RAW12 

Port 12. Used to notify logger states.

LogSinkITM_STIM_RAW13 

Port 13. Reserved for future use.

LogSinkITM_STIM_RAW14 

Port 14. Reserved for logger header messages.

LogSinkITM_STIM_RAW15 

Port 15. Reserved for logger main data transfer.

LogSinkITM_STIM_RESV16 

Port 16. Reserved for raw ITM data.

LogSinkITM_STIM_RESV17 

Port 17. Reserved for raw ITM data.

LogSinkITM_STIM_RESV18 

Port 18. Reserved for raw ITM data.

LogSinkITM_STIM_RESV19 

Port 19. Reserved for raw ITM data.

LogSinkITM_STIM_RESV20 

Port 20. Reserved for raw ITM data.

LogSinkITM_STIM_RESV21 

Port 21. Reserved for raw ITM data.

LogSinkITM_STIM_RESV22 

Port 22. Reserved for raw ITM data.

LogSinkITM_STIM_RESV23 

Port 23. Reserved for raw ITM data.

LogSinkITM_STIM_RESV24 

Port 24. Reserved for raw ITM data.

LogSinkITM_STIM_RESV25 

Port 25. Reserved for raw ITM data.

LogSinkITM_STIM_RESV26 

Port 26. Reserved for raw ITM data.

LogSinkITM_STIM_RESV27 

Port 27. Reserved for raw ITM data.

LogSinkITM_STIM_TRACE 

Port 28. Reserved for logger main data transfer.

LogSinkITM_STIM_HEADER 

Port 29. Reserved for logger header messages.

LogSinkITM_STIM_TIME_SYNC 

Port 30. Reserved for logger time sync.

LogSinkITM_STIM_INFO 

Port 31. Reserved for logger control/info packets.

§ LogSinkITM_ControlWord

Enumerator
LogSinkITM_Info_Timing 

Function Documentation

§ LogSinkITM_init()

void LogSinkITM_init ( void  )

§ LogSinkITM_finalize()

void LogSinkITM_finalize ( void  )

§ ti_log_LogSinkITM_printf()

void ti_log_LogSinkITM_printf ( const Log_Module *  handle,
uint32_t  header,
uint32_t  index,
uint32_t  numArgs,
  ... 
)

§ ti_log_LogSinkITM_buf()

void ti_log_LogSinkITM_buf ( const Log_Module *  handle,
uint32_t  header,
uint32_t  index,
uint8_t *  data,
size_t  size 
)

§ _Log_DEFINE_LOG_VERSION()

_Log_DEFINE_LOG_VERSION ( LogSinkITM  ,
0.1.  0 
)
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale