; -------------------------------------------------------------------------------- ; @Title: Snooper Example for PowerPC ; @Description: ; Loads simple demo application in SRAM, then ; samples periodically variables and displays their ; value graphical over time ; @Author: HLG ; @Copyright: (c) 1989-2014 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Id: snoop.cmm 10304 2017-01-10 15:48:36Z hlohn $ DO "~~~~/demo_sram.cmm" // Configure the snooper to record the course of the variables plot1 and plot2 (in a non-intrusive way) IF !SIMULATOR() SYStem.MemAccess NEXUS SNOOPer.RESet SNOOPer.SELect Var.RANGE(plot1) Var.RANGE(plot2) SNOOPer.Mode StopAndGo OFF SNOOPer.Rate 500.us SNOOPer.AutoArm ON SNOOPer.Init SNOOPer.Arm WinCLEAR SCREEN.ALways LOCAL &options IF SIMULATOR() &options="/MarkedVector" // Show sampling point on rather slow Simulator // SNOOPer.DRAW.channel ist the old tricky style WinPOS 0% 0% 50% 50% SNOOPer.DRAW %Decimal Data.W /Filter ADDRESS plot1 WinPOS 50% 0% 50% 50% SNOOPer.DRAW %Decimal Data.W /Filter ADDRESS plot2 // SNOOPer.DRAW.channel getting really tricky if you want to draw more than one value in the same window Var.Break.Set plot1 /Alpha Var.Break.Set plot2 /Beta WinPOS 0% 50% 50% 50% SNOOPer.DRAW %Decimal Data.W /Color // SNOOPer.DRAW.Data (availalbe since Nov 2012) // It is the right choice to draw the course of any value in memory without symbol information. // If the data you'd like to draw corresponds to a C/C++ variable (like in this example) better use SNOOPer.DRAW.Var (see below) IF VERSION.BUILD.BASE()>39912. ( WinPOS 51% 51% 50% 50% SNOOPer.DRAW.Data %Decimal.Word plot1++1 plot2++1 &options ) // SNOOPer.DRAW.Var (available since Jan 2013) is the easiest and recommended way to draw the course of a C/C++ variable IF VERSION.BUILD()>41354. ( WinPOS 50% 50% 50% 50% SNOOPer.DRAW.Var %DEFault plot1 plot2 &options // SNOOPer.DRAW.Var (-90.)--(-50.),100.0,-16000.0,plot1 plot2 /MarkedVector // | | | | // | | | +-- Option to show sampling points // | | +-- Optional lower start value: Lowest value shown immediately is -16000.0 // | +-- Optional Y scaling: 100.0units = 1px // +-- Optional time scaling: Show immediately only samples -90 to -51 ) WinPOS 1% 1% 50% 50%,,,profile Var.PROfile %E plot1 plot2 WinPOS 51% 1% ,,,,, snoop SNOOPer.state PRINT "Please wait 10 seconds..." Go.direct RePeaT 10. ( PRINT %CONTinue "." WAIT 1.s ) Break.direct WinCLEAR snoop WinCLEAR profile ENDDO