Added debug script for offchip tracing in Aufgabe6
This commit is contained in:
96
Debug/ps7/Aufgabe6/zc706_offchip_trace.cmm
Normal file
96
Debug/ps7/Aufgabe6/zc706_offchip_trace.cmm
Normal file
@@ -0,0 +1,96 @@
|
||||
LOCAL &ppd
|
||||
&ppd=OS.PPD()
|
||||
&tmpDir=OS.PTD()
|
||||
|
||||
WinCLEAR
|
||||
|
||||
; --------------------------------------------------------------------------------
|
||||
; common SYStem settings
|
||||
PRINT "Assigning Cores"
|
||||
|
||||
CD &ppd
|
||||
RESet
|
||||
System.RESet
|
||||
SYStem.CPU ZYNQ-7000
|
||||
SYStem.CONFIG CORE 1. 1.
|
||||
SYStem.CONFIG SLAVE OFF
|
||||
CORE.ASSIGN 1.
|
||||
|
||||
; set DaisyChaining Parameters of the board
|
||||
; check e.g. SYStem.DETECT.ShowCHAIN
|
||||
PRINT "Setting up DaisyChain Parameters"
|
||||
SYStem.CONFIG DAPIRPRE 6.
|
||||
SYStem.CONFIG DAPIRPOST 0.
|
||||
SYStem.CONFIG DAPDRPRE 1.
|
||||
SYStem.CONFIG DAPDRPOST 0.
|
||||
|
||||
; trigger a soft-reset using the AHB Bus -> we loose the connection
|
||||
PRINT "Trigger Soft-Reset"
|
||||
SYStem.Mode.Prepare
|
||||
ON ERROR CONTinue
|
||||
Data.Set EAHB:0xF8000008 %Long 0xDF0D
|
||||
Data.Set EAHB:0xF8000200 %Long 0x1
|
||||
WAIT 0.1s
|
||||
PRINT ""
|
||||
ON ERROR inherit
|
||||
|
||||
PRINT "Attach and initialize"
|
||||
SYStem.Mode.Attach
|
||||
Break
|
||||
|
||||
PRINT "initializing the target"
|
||||
DO "~~/demo/arm/hardware/zynq-7000/scripts/trace/ps7_init.cmm" "&ppd/../ps7_init.tcl"
|
||||
|
||||
PRINT "programming the FPGA design"
|
||||
LOCAL &bitfile
|
||||
&bitfile="&ppd/../base_zynq_wrapper.bit"
|
||||
DO "~~/demo/arm/hardware/zynq-7000/scripts/zynq_bitstream" "&bitfile" 0x00100000
|
||||
|
||||
PRINT "initializing the target - Postconfig"
|
||||
DO "~~/demo/arm/hardware/zynq-7000/scripts/trace/ps7_init.cmm" "&ppd/../ps7_init.tcl" "POST"
|
||||
|
||||
; --------------------------------------------------------------------------------
|
||||
; initialize OFFCHIP trace
|
||||
Trace.METHOD Analyzer
|
||||
ETM.TraceID 1.
|
||||
TPIU.PortSize 32
|
||||
Analyzer.PortSize 16 ; Set the trace port width to 16
|
||||
ETM.PortMode Continuous
|
||||
|
||||
Trace.Clock 666MHz
|
||||
ETM.TimeMode CycleAccurate
|
||||
|
||||
Analyzer.AutoFocus ; Set threshold and sampling points automatically
|
||||
|
||||
; Some optional settings
|
||||
SETUP.Var %SpotLight
|
||||
MAP.BOnchip 0x0--0xffffffff // force onchip-breakpoints
|
||||
MODE.HLL
|
||||
|
||||
; load code
|
||||
Data.LOAD.Elf "&ppd/../../../out/Aufgabe6_ps7_core0.elf"
|
||||
|
||||
; run to main
|
||||
Go main
|
||||
WAIT !STATE.RUN()
|
||||
|
||||
ETM.Trace ON
|
||||
ETM.ON
|
||||
|
||||
; open some windows
|
||||
DO windowSetting.cmm
|
||||
|
||||
break.set symbol.begin(GT_TaskActivationHook) /program /TraceOn
|
||||
break.set symbol.epilog(GT_TaskActivationHook) /program /TraceOff
|
||||
|
||||
break.set symbol.begin(GT_TaskEndHook) /program /TraceOn
|
||||
break.set symbol.epilog(GT_TaskEndHook) /program /TraceOff
|
||||
|
||||
; initialize RTOS support
|
||||
PRINT "initializing uC/OS-II support..."
|
||||
TASK.CONFIG ../ucos ; load uC/OS-II Awareness
|
||||
MENU.ReProgram ../ucos.men ; load uC/OS-II Menu
|
||||
HELP.FILTER.Add rtosucos ; add ucos awareness manual to help filter
|
||||
|
||||
|
||||
ENDDO
|
||||
Reference in New Issue
Block a user