WinCLEAR ; -------------------------------------------------------------------------------- ; initialize and start the debugger RESet SYStem.RESet SYStem.CPU IMXRT1010 SYStem.CONFIG.DEBUGPORTTYPE JTAG SYStem.Option DUALPORT ON SYStem.MemAccess DAP SYStem.JtagClock CTCK 10MHz Trace.DISable SYStem.Up ; -------------------------------------------------------------------------------- ; load demo program (uses internal RAM only) Data.LOAD.Elf "~~~~/hello_world.elf" ; -------------------------------------------------------------------------------- ; initialize OFFCHIP trace (ETM, ITM) IF COMBIPROBE()||UTRACE()||Analyzer() ( ; set PinMux and enable Clocks ; TRACECLK - IOMUX_GPIO_AD_02 – ALT7 ; TRACEDATA0 - IOMUX_GPIO_AD_00 – ALT7 ; TRACEDATA1 - IOMUX_GPIO_AD_13 – ALT7 ; TRACEDATA2 - IOMUX_GPIO_AD_12 – ALT7 ; TRACEDATA3 - IOMUX_GPIO_AD_11 – ALT7 Data.Set AD:0x401F8040 %Long 0x7 Data.Set AD:0x401F8048 %Long 0x7 Data.Set AD:0x401F8088 %Long 0x7 Data.Set AD:0x401F808C %Long 0x7 Data.Set AD:0x401F8090 %Long 0x7 ;replace the following code for I.MXRT1050 Validation Board ; set PinMux and enable Clocks ; TRACECLK - IOMUX_GPIO_B0_12 - ALT2 ; TRACEDATA0 - IOMUX_GPIO_B0_4 - ALT3 ; TRACEDATA1 - IOMUX_GPIO_B0_5 - ALT3 ; TRACEDATA2 - IOMUX_GPIO_B0_6 - ALT3 ; TRACEDATA3 - IOMUX_GPIO_B0_7 - ALT3 ; Data.Set AD:0x401F816C %Long 0x2 ; Data.Set AD:0x401F814C %Long 0x3 ; Data.Set AD:0x401F8150 %Long 0x3 ; Data.Set AD:0x401F8154 %Long 0x3 ; Data.Set AD:0x401F8158 %Long 0x3 ;replace the following code for I.MXRT1020 Validation Board ; set PinMux and enable Clocks ; TRACECLK - IOMUX_GPIO_AD_B0_10 - ALT6 ; TRACEDATA0 - IOMUX_GPIO_AD_B0_12 - ALT6 ; Data.Set AD:0x401F80E4 %Long 0x6 ; Data.Set AD:0x401F80EC %Long 0x6 TPIU.PortSize 4 TPIU.PortMode Continuous ITM.DataTrace CorrelatedData ITM.ON ETM.Trace ON ETM.COND ALL ETM.ON ) IF COMBIPROBE()||UTRACE() ( Trace.METHOD CAnalyzer Trace.AutoInit ON IF VERSION.BUILD.BASE()>=74752. ( CAnalyzer.AutoFocus ) ELSE ( ; for uTrace & Combiprobe use manual calibration ; CAnalyzer.ClockDELAY Large ) ) IF Analyzer() ( Trace.METHOD Analyzer Trace.AutoInit ON Trace.AutoFocus ) ; -------------------------------------------------------------------------------- ; start program execution Go.direct main WAIT !STATE.RUN() ; -------------------------------------------------------------------------------- ; setup ITM based datatrace of variable ch ;Var.Break.Set ch /Write /TraceData ; -------------------------------------------------------------------------------- ; open some windows WinCLEAR Mode.Hll WinPOS 0. 0. 116. 26. List.auto WinPOS 120. 0. 100. 8. Frame.view WinPOS 120. 14. Var.Watch Var.AddWatch %SpotLight ast flags WinPOS 120. 25. Trace.List ;WinPOS 0. 32. ;Trace.DRAW.Var %DEFault ch ENDDO