MAJIC+ COMMAND FILES FOR ARM ETM The sample command files TRDEMODT.CMD and TRDEMO.CMD are user modifiable files written to trace cdbdemo.c with and without data. They load the cdbdemo.axf file into target memory, setup all ARM ETM trace registers, set a breakpoint at __sys_exit, enable tracing, and then run the cdbdemo on the target. The following sample command files are working examples that you may want to modify and/or use to see how the ETM aliased command files are used. CLRETM: This command file clears all ETM registers to a benign state. EALLETM: Configures all ARM ETM Registers. This is an Example command file that shows how to use all of the ARM ETM aliased command files. ETRACE: This is an Example command file that shows how to configure the ARM ETM Registers needed for Tracing. The TRDEMO and TRDEMODT command files use this file to setup Trace Regions and Trigger Event. The user may change the address ranges used for tracing and trigger event in this file. EVIEW: This is an Example command file that shows how to configure the ARM ETM Registers needed for ViewData. The TRDEMODT command file uses this file to setup Data Trace Regions. The user may change the address ranges used for Tracing Data in this file. The following command files are located in the ./bin directory and are aliased for use with the ARM ETM. These files SHOULD NOT be modified by the user. The one exception to this rule is the ECTRL command file which writes to the ARM ETM Control Register. Examples files showing how to use these command files are described at the beginning of this document. ETMX: This command file sets all ARM ETM command file aliases. It also sets all $ETMREG_... (ETM Register) globals used by ARM ETM command files. This file is not aliased. EACMP: This command file writes to the ARM ETM Address Comparator Register. Parameters passed: Address Comparator Index Address Value Select Data Comparator Select Masking of Address Select Access Type ECNTI: This command file writes to the ARM ETM Initial Counter Register. Parameters passed: Counter Register Index Initial Count Value ECNTR: This command file writes to the ARM ETM Counter Event Registers. Parameters passed: Counter Register Index Event Register Location [Counter Enable Control] Resource Type A Resource Index A Resource Type B Resource Index B Boolean Function ECTRL: This command file Writes to the ARM ETM Control Register. All valid values for the Control register are configured and supplied in this command file. The user MUST EDIT this file to select the desired Control Register settings. Values are selected by commenting or un-commenting the appropriate lines. Parameters passed: ETM Programming Bit NOTE: Firmware clears the ETM Programming Bit prior to Tracing EDCMP: This command file writes to the ARM ETM Data Comparator Register. Parameters passed: Data Comparator Index Data Value Data Mask EEVNT: This command file writes to the ARM ETM Event Program Register. Parameters passed: Event Register Pointer Resource Type A Resource Index A Resource Type B Resource Index B Boolean Function EFIFO: This command file writes to the ARM ETM FIFOFULL Program Register. Parameters passed: FIFOFULL Level FIFOFULL inc/exc Control Memory Map Decoders Address Range Comparators EMMAP: This command file sets the ARM ETM Memory Map Decode Control Register. Parameters passed: Memory Map Decode Control Value ETRCE: This command file writes to the ARM ETM TraceEnable Registers. Parameters passed: Include/Exclude Control Memory Map Decoders Address Range Comparators EVDAT: This command file writes to the ARM ETM ViewData Control Registers. Parameters passed: (ViewData Control 1) ViewData Register 1 Addr Comparator Exclude Control (bitwise [15:0]) Addr Comparator Include Control (bitwise [15:0]) Parameters passed: (ViewData Control 2) ViewData Register 2 Memory Map Exclude Control (bitwise [15:0]) Memory Map Include Control (bitwise [15:0]) Parameters passed: (ViewData Control 3) ViewData Register 3 Addr Range Comparator Exclude Control (bitwise [7:0]) Addr Range Comparator Include Control (bitwise [7:0]) Control to Select Mixed Mode or Exclude Only ([0]) DACMP: This command file Reads and Displays the ARM ETM Address Comparator Registers. Parameters passed: Address Comparator Index DALL: This command file Displays ALL the ARM ETM Registers DCNFG: This command file Reads and Displays the ARM ETM Configuration Register. DCNTR: This command file Reads and Displays the ARM ETM Counter Registers. Parameters passed: Counter Register Index DCTRL: This command file Reads and Displays the ARM ETM Control Register. DDCMP: This command file Reads and Displays the ARM ETM Data Comparator Registers. Parameters passed: Data Comparator Index DEVNT: This command file Displays a ARM ETM Event Register. Parameters passed: Event Register DFIFO: This command file Reads and Displays the ARM ETM FIFOFULL Registers. DIREG: This command file Reads and Displays All ARM ETM Implementation Specific Registers. DMMAP: This command file Reads and Displays the ARM ETM Memory Map Decode Control Register. DSEQ: This command file Reads and Displays the ARM ETM Sequencer Registers. DTRAC: This command file Reads and Displays the ARM ETM TraceEnable Registers. DTRIG: This command file Reads and Displays the ARM ETM Trigger Event Register. DVDAT: This command file Reads and Displays the ARM ETM ViewData Registers. DXALL: This command file Reads and Displays All 128 ARM ETM Registers. NOTE: Write Only Register values are cached by Majic firmware and show the last value written. DXOUT: This command file Reads and Displays the ARM ETM External Output Registers. DXREG: This command file Reads and Displays Any ARM ETM Register. Parameters passed: ETM Register #