This GOAL core module provides macros for tracing data via a configurable interface. Helpful for getting additional information about the system on debugging or setting reference pins for e.g. timing analysis. Tracing data is disabled by default.
Table: GOAL_TGT_TRACE8
Macro
GOAL_TGT_TRACE8(_chan, _data)
Description
tracing an 8-bit value
Parameters
_chan
output channel
_data
data value
Category
Optional
Condition
Compiler-define GOAL_CONFIG_TGT_TRACE must be set to 1 and a tracing interface has to be enabled.
Table: GOAL_TGT_TRACE16
Macro
GOAL_TGT_TRACE16 (_chan, _data)
Description
tracing a 16-bit value
Parameters
_chan
output channel
_data
data value
Category
Optional
Condition
Compiler-define GOAL_CONFIG_TGT_TRACE must be set to 1 and a tracing interface has to be enabled.
Table: GOAL_TGT_TRACE
Macro
GOAL_TGT_TRACE32(_chan, _data)
Description
tracing a 32-bit value
Parameters
_chan
output channel
_data
data value
Category
Optional
Condition
Compiler-define GOAL_CONFIG_TGT_TRACE must be set to 1 and a tracing interface has to be enabled.
Table: GOAL_TGT_TRACE_BIT_SET
Macro
GOAL_TGT_TRACE_BIT_SET(_chan, _bit)
Description
Setting a single bit on the tracing data. Keeping the other bits unchanged. This feature is available for tracing via pin only.
Parameters
_chan
output channel
_bit
bit position
Category
Optional
Condition
Compiler-define GOAL_CONFIG_TGT_TRACE and GOAL_CONFIG_TGT_TRACE_PIN must be set to 1.
Table: GOAL_TGT_TRACE_BIT_CLR
Macro
GOAL_TGT_TRACE_BIT_CLR(_chan, _bit)
Description
Clearing a single bit on the tracing data. Keeping the other bits unchanged. This feature is available for tracing via pin only.
Parameters
_chan
output channel
_bit
bit position
Category
Optional
Condition
Compiler-define GOAL_CONFIG_TGT_TRACE and GOAL_CONFIG_TGT_TRACE_PIN must be set to 1.
Tracing via ITM
The Instrumentation Trace Macrocell (ITM) is a special ARM feature providing a tracing interface for output data via debugger. Handling single data bits by GOAL_TGT_TRACE_BIT_SET or GOAL_TGT_TRACE_BIT_CLR is not implemented at this version.
Tracing via pin
Outputs the data on pins. The number and choice of pins is board specific and may not be available on all systems.
Please verify, that the configured tracing pins are free to use before enabling this GOAL feature.
There are no different output channels, so the _chan argument at the macros will not be considered.
Configuration
The following defines enable the tracing module and its interface.
GOAL_CONFIG_TGT_TRACE
0: tracing is switched off for the complete GOAL system (default)
1: tracing is switched on for the complete GOAL system
GOAL_CONFIG_TGT_TRACE_PIN
0: tracing the data via board specific pins is switched off (default)
1: tracing the data via board specific pins is switched on. The number and choice of pins is configured the board. Please read section 5.14.2Tracing via pin before enabling this feature.
GOAL_CONFIG_TGT_TRACE_ITM:
0: tracing the data via ITM is switched off (default)
1: tracing the data via ITM is switched on.
GOAL_CONFIG_TGT_TRACE_ITM_WITHOUT_PC:
0: tracing the data via ITM with no additional information about the program counter (default)
1: tracing the data via ITM next to the program counter when tracing