Download MCDS User`s Guide

Transcript
OCTL Complex Trigger Programming
OCTL (On-Chip Trigger Language) can be used for advanced trigger and trace filter programming. It is
designed to allow any possible MCDS programming without requiring knowledge about the MCDS
registers.
NOTE:
OCTL currently only supports TriCore devices, so users of C166 and XC2000 can
skip this chapter.
OCTL Features
While the triggers and filters via the Break.Set command only trigger on accesses made by the CPU, OCTL
additionally allows triggering on accesses or events performed by any other component, e.g. a bus. Instead
of registers or abstract identifiers, the component names can be used.
OCTL also allows to implement state machines, e.g. “Break on any write access to a certain address after
component “C” has been initialized”.
OCTL programs can be written with an external editor or the internal editor MCDS.Program. Already
existing OCTL programs can be compiled using the MCDS.ReProgram command.
For creating simple TriCore OCTL programs, see demo/tricore/etc/mcds/mcdsdlg.cmm
The default file name extension for an on-chip trigger program is “octl”. If no file name is specified, the file
t32.octl is used.
OCTL Example: Bus Trigger
A common error scenario is that a peripheral module, e.g. the DMA controller, overwrites a variable in the
data RAM. Trigger and filter via the Break.Set command e.g., the CPU’s on-chip breakpoints, cannot be
used in this case, as they only trigger on data accesses performed by the CPU. Instead a bus trigger is
required.
The following example sets a bus trigger to the LMB of a TC1797ED:
DATAADDRESSWRITE.LMB WriteLocation D:0xD000A1EC++0x3
TRACE.ONCE DATAADDRESSWRITE.LMB IF WriteLocation
TRACE.ONCE DATAVALUEWRITE.LMB IF WriteLocation
BREAK IF WriteLocation
©1989-2015 Lauterbach GmbH
MCDS User’s Guide
69
OCTL Complex Trigger Programming