![]() |
Event Recorder
Version 1.0.1
MDK Debugger Views for Status and Event Information
|
The following steps enable the MDK debugger views for static information and dynamic events.
For User Code:
For MDK Middleware and Keil RTX5:
The software packs for MDK Middleware and CMSIS already contain the *.SCVD files and the related event annotations in the C source code.
To use the Event Recorder in an application, you need to:
To to stream dynamic event information, insert calls to the Event Data Recording functions on relevant code locations:
These Event Data Recording functions receive as first parameter an id event identifier used for filtering and displaying. The macro EventID may be used to compose id values to include level
and component
numbers.
Example:
When executing this example in the µVision debugger, use the menu command View - Analysis Windows - Event Recorder to open the Event Recorder window. This should show the following output:
You may create an *.SCVD (Software Component View Description) file to format the event output so that matches the application. The event output is created using the /component_viewer/events.
SCVD file example
In the µVision debugger, this *.SCVD file is specified in the dialog Options for Target -> Debug -> Manage Component Viewer Description Files. Click on Add Component Viewer Description File and add the related .SCVD file.
The Event Recorder displays the events as shown below.
The described groups and events also show up in the filter dialog.
The software packs for MDK Middleware and CMSIS already contain SCVD files that match the related event annotations in the C source code. However, you need to select the right component Variant. For MDK Middleware, you need to select the Debug variants, whereas for Keil RTX5, you need to add the Source variant.
The example below enables event recording for the MDK-Middleware File System component:
The Event Recorder can be used to retarget printf output. This is especially interesting for targets without ITM, such as Cortex-M0/M0+/M23. Steps to enable this:
EventRecorder.h
and call the EventRecorderInitialize()
function in main().Refer to the example Retarget STDOUT via Event Recorder in "I/O Retargeting".