Event Recorder and Component Viewer  Version 1.4.0
MDK Debugger Views for Status and Event Information
 All Files Functions Macros Groups Pages
Overview

A Software Component Viewer Description (*.SCVD) file in SCVD File Format (XML) defines the content that is displayed in the Component Viewer and Event Recorder. In addition, using the Event Recorder API, you can annotate your code so that you can get statistical data on the time spent in a loop or on the energy consumption (ULINKplus required).

The debugger can load multiple *.SCVD files as typically each software component has an individual description file.

About Component Viewer

The Component Viewer reads specific memory locations from the target hardware using a standard debug unit (for example a ULINK debug adapter) that is connected via JTAG or SWD to the CoreSight Debug Access Port (DAP). The address of these memory locations is typically defined by symbols that represent variables, arrays, or starting point of linked lists. The *.SCVD file specifies these symbols and customizes the formatting in the Component Viewer window of the debugger.

ComponentViewerOverview.png
Component Viewer displays status variables

Benefits of the Component Viewer:

  • Visibility to the static user relevant information of an software component or application program with no additional software overhead in the target application.
  • The information is obtained via debug symbols from target memory using simple read commands via JTAG or SWD connectivity to a debug adapter.
  • Debug adapters that support hot plugging allow to show the current status of the application software in case of failures.

About Event Recorder

The software component Event Recorder provides an API (function calls) for event annotations in the application code or software component libraries. These API functions record event timing and data information while the program is executing. The Event Filter which is controlled from the target application or the debugger allows to specify the event ids that are stored in the event buffer that is located in the memory of the target system. This event buffer may be continuously read by the debug unit and displayed in the Event Recorder window of the debugger.

During program execution, the debugger reads the content of the event buffer using a standard debug unit (for example a ULINK debug adapter) that is connected via JTAG or SWD to the CoreSight Debug Access Port (DAP). The Event Recorder requires no trace hardware and can be therefore used on any Cortex-M processor.

EventRecorderOverview.png
Event Recorder

Using Event Recorder explains formatting in the Event Recorder debug window of the event data information that is obtained via event annotations in the user application.

Benefits of the Event Recorder:

  • Visibility to the dynamic execution of an application at little (memory) cost.
  • Adding RTOS awareness to a development tool does not require complex DLL programming.
  • For Arm Cortex-M3/M4/M7/M33 processor based devices, Event Recorder functions will not disable interrupts.
  • Adding printf re-targeting for devices without ITM, such as Arm Cortex-M0/M0+/M23.
  • Fast time-deterministic execution of event recorder functions with minimal code and timing overhead.
  • No need for a debug or release build as the event annotations can remain in production code.
  • Saving the event data in local memory ensures fast recording.
  • Collecting the data from the on-chip memory is done using simple read commands. These commands work on all Cortex-M processor based devices and require only JTAG or SWD connectivity to the debug adapter.
  • Using the DWT Cycle Count register for creating time stamps reduces code overhead (available on Arm Cortex-M3/M4/M7/M33).

About Event Statistics

The Event Execution Statistics functions allow you to collect and statistical data about the code execution. Any debug adapter can be used to record execution timing and number of calls for annotated code sections:

EventStatistics_wo_Energy.png
Event Statistics for user code

Energy profiling is of annotated code sections is possible using ULINKplus. When combined with power measurement, the Event Statistics window displays the energy consumption of the code section with min/man/average values:

EventStatistics_w_Energy.png
User code energy profiling

Benefits of Event Statistics:

  • Collect statistical data about the code execution (time and energy).
  • Log files enable comparisons between different build runs in continuous integration (CI) environments.
  • Improve overall code quality and energy profile (especially relevant for battery driven applications).

For more information, refer to Using Event Statistics.