TRACE MEMORY WINDOW

8.14 TRACE MEMORY WINDOW

The Trace memory window (under the View menu) helps you to monitor much of the processor operation. Up to 32767 instruction cycles can be displayed.

• Trace Window Display • Trace Window Menu • Trace Window FAQ

8.14.1 Trace Window Display

The Trace memory window contains the following information for each execution cycle: • Line Number ( Line) – Cycle's position relative to the trigger or halting point.

• Address ( Addr) – Address of the instruction being fetched from program memory. • Opcode ( Op) – Instruction being fetched. • Label ( Label) – Label (if any) associated with the program memory address. • Instruction ( Instruction) – Disassembled instruction. • Source Data Address ( SA) – Address or symbol of the source data, if applicable. • Source Data Value ( SD) – Value of the source data, if applicable. • Destination Data Address ( DA) – Address or symbol of the destination data, if

applicable. • Destination Data Value ( DD) – Value of the destination data, if applicable. • Time Stamp ( Cycles/Time) – Time stamp value in cycles or seconds • External Inputs ( Probe #) – Value of the external inputs (if any).

The approximate trigger cycle will be numbered as cycle 0. All other cycles will be numbered based on this cycle. Cycles that occurred before the trigger point will have

a negative cycle number, and cycles that occurred after the trigger point will have a positive number.

The Trace memory window may be left open at all times, moved or resized. Data in the window may be edited “in place”.

8.14.2 Trace Window Menu Below are the menu items in the Trace memory right-click menu.

• Close Close this window. • Find Opens the Find dialog. In the Find What field, enter a string of text you want to

find, or select text from the drop-down list. You can also select text in the edit window or place the cursor over a word you want to search for, before you open the Find dialog.

In the Find dialog you may select any of the available options and the direction you want to search. Up searches backward from the insertion point, Down searches forward.

• Find Next Find the next instance of Find text.

F3 repeats the last Find. Shift+F3 reverses the direction of the last Find.

 2005 Microchip Technology Inc.

DS51519A-page 123

MPLAB ® IDE User’s Guide

• Go To Jump to the line specified in the dialog. Line number is shown in the first column of

the window. • Go To Source Line Go to the source code line corresponding to the selected trace code line. • Jump to Trigger Jump to the location of the trigger. • Jump to Top Jump to the top of the window. • Jump to Bottom Jump to the bottom of the window. • Reload Reload the trace memory window with the contents of the trace buffer. • Reset Time Stamp Reset the time stamp conditionally on processor reset, on run or manually. Or,

force an immediate reset by selecting Reset Now. • Display Time Display the time stamp as a cycle count, in elapsed seconds or in engineering

format. • Symbolic Disassembly Instead of numeric address for SFR's and symbols, display the names in listing. • Output to File Export the contents of the trace memory window to a file. Uses a Save As dialog

(see Section 9.8 “File Management Dialog”), with the addition of cycle and tab information. Enter a “Start” and “End” cycle to write to the file. Also specify if the text is to be tab-delimited.

• Print Print the contents of the trace memory window. • Refresh Refresh the viewable contents of the window. • Properties Set up window properties. See Section 9.17 “Properties Dialog”.

8.14.3 Trace Window FAQ

How do I: • Set up a simple trace?

In the file (editor) window containing application code, select either “Add Filter-in Trace” or “Add Filter-out Trace” from the right-mouse menu. For more information on filter trace, see Section 11.5 “Working with Debug Features”.

• Set up a more complex trace? Many debug tools allow you to set up several conditions to define a trace. Consult

the documentation for that tool to determine how to set up this type of trace.

DS51519A-page 124

 2005 Microchip Technology Inc.

MPLAB IDE Windows