tinySA/testhal/SPC560Dxx/SPI/UDE/debug .wsx

274 lines
72 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="ISO-8859-1"?>
<stg format="2.0">
<OriginalWsp type="string">debug .wsx</OriginalWsp><BackupWspFlag type="flag">0</BackupWspFlag><UseWspCnt type="int">0</UseWspCnt><WspCloseCnt type="int">2</WspCloseCnt><ProdInfo type="bin" size="52">vQTv/gAAAQAXAAIA6AkIAAAABAAAAAAAPwAAAAAAAAAEAAAAAgAAAAAAAAAAAAAAAAAAAA==</ProdInfo><ProdInfoString type="string">4.0</ProdInfoString><CreationDate type="string">19.11.2012 16:18:08:999</CreationDate><MainFrame type="key"><PersistTreeRoot type="key"><DesktopState type="key"><Placement type="key"><MainFrame type="string">MCAAAAAAAAAAAAAABAAAAAAAPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPHHAAAAAAPBAAAAAADGFAAAAABCDAAAAA</MainFrame><WorkbookMode type="string">False</WorkbookMode><DockStateSaved type="string">True</DockStateSaved></Placement><DockState type="key"><Bars type="string">14</Bars><ScreenCX type="string">1680</ScreenCX><ScreenCY type="string">1050</ScreenCY><Bar-0 type="key"><BarID type="string">59393</BarID><Style type="string">32768</Style><ExStyle type="string">0</ExStyle><PrevFloating type="string">False</PrevFloating><MDIChild type="string">False</MDIChild><PctWidth type="string">1000000</PctWidth><MRUFloatCX type="string">0</MRUFloatCX><MRUFloatCY type="string">0</MRUFloatCY><MRUHorzDockCX type="string">0</MRUHorzDockCX><MRUHorzDockCY type="string">0</MRUHorzDockCY><MRUVertDockCX type="string">0</MRUVertDockCX><MRUVertDockCY type="string">0</MRUVertDockCY><MRUDockingState type="string">0</MRUDockingState><DockingStyle type="string">0</DockingStyle><TypeID type="string">0</TypeID><ClassName type="string">UDEStatusBar</ClassName><WindowName type="string">For Help, press F1</WindowName><ResourceID type="string">0</ResourceID></Bar-0><Bar-1 type="key"><BarID type="string">59419</BarID><Bars type="string">11</Bars><Bar_0 type="string" name="Bar#0">0</Bar_0><Bar_1 type="string" name="Bar#1">59647</Bar_1><Bar_2 type="string" name="Bar#2">0</Bar_2><Bar_3 type="string" name="Bar#3">59399</Bar_3><Bar_4 type="string" name="Bar#4">59398</Bar_4><Bar_5 type="string" name="Bar#5">59397</Bar_5><Bar_6 type="string" name="Bar#6">59403</Bar_6><Bar_7 type="string" name="Bar#7">59401</Bar_7><Bar_8 type="string" name="Bar#8">59406</Bar_8><Bar_9 type="string" name="Bar#9">59402</Bar_9><Bar_10 type="string" name="Bar#10">0</Bar_10><Style type="string">0</Style><ExStyle type="string">0</ExStyle><PrevFloating type="string">False</PrevFloating><MDIChild type="string">False</MDIChild><PctWidth type="string">0</PctWidth><MRUFloatCX type="string">0</MRUFloatCX><MRUFloatCY type="string">0</MRUFloatCY><MRUHorzDockCX type="string">0</MRUHorzDockCX><MRUHorzDockCY type="string">0</MRUHorzDockCY><MRUVertDockCX type="string">0</MRUVertDockCX><MRUVertDockCY type="string">0</MRUVertDockCY><MRUDockingState type="string">0</MRUDockingState><DockingStyle type="string">0</DockingStyle><TypeID type="string">0</TypeID><ClassName type="string">CUDEDockBar</ClassName><WindowName type="string"></WindowName><ResourceID type="string">0</ResourceID></Bar-1><Bar-2 type="key"><BarID type="string">59422</BarID><Bars type="string">3</Bars><Bar_0 type="string" name="Bar#0">0</Bar_0><Bar_1 type="string" name="Bar#1">9110</Bar_1><Bar_2 type="string" name="Bar#2">0</Bar_2><Style type="string">0</Style><ExStyle type="string">0</ExStyle><PrevFloating type="string">False</PrevFloating><MDIChild type="string">False</MDIChild><PctWidth type="string">0</PctWidth><MRUFloatCX type="string">0</MRUFloatCX><MRUFloatCY type="string">0</MRUFloatCY><MRUHorzDockCX type="string">0</MRUHorzDockCX><MRUHorzDockCY type="string">0</MRUHorzDockCY><MRUVertDockCX type="string">0</MRUVertDockCX><MRUVertDockCY type="string">0</MRUVertDockCY><MRUDockingState type="string">0</MRUDockingState><DockingStyle type="string">0</DockingStyle><TypeID type="string">0</TypeID><ClassName type="string">CUDEDockBar</ClassName><WindowName type="string"></WindowName><ResourceID type="string">0</ResourceID></Bar-2><Bar-3 type="key"><BarID type="string">59420</BarID><Bars type="string">3</Bars><Bar_0 type="string" name="Bar#0">0</Bar_0><Bar_1 type="string" name="Bar#1">9100</Bar_1><Bar_2 type="string" name="Bar#2">0</Bar_2>
and fill target memory ranges</ScriptDescription><ScriptPath type="string">V:\UDE\AddOns\Macro\MacroLibrary\StdMacros1.dsm</ScriptPath><ScriptSource type="string">'
' $Header: /Ude/AddOns/Macro/MacroLibrary/StdMacros.dsm 3 30.04.04 9:34 Weisses $
'_______________________________________________________
'
' universal debug engine
'
' Standard command line macros - part 1
'
' pls Development Tools 1999-2004
'
' 28.04.04 SW correction for UDE 1.10
' 03.06.03 SW initial version
'_______________________________________________________
'_______________________________________________________
'
' UnAss command line function
'
' generates disassembly file
'
' command line UnAss output-file range1 [range2] [range3] .....
' range description:
' C:&lt;startaddress&gt;,&lt;length&gt; or - code
' DB:&lt;startaddress&gt;,&lt;length&gt; or - data byte
' DW:&lt;startaddress&gt;,&lt;length&gt; or - data word
' DD:&lt;startaddress&gt;,&lt;length&gt; or - data dword
'_______________________________________________________
Sub UnAss(File,ParameterObj)
set debugger = workspace.Coredebugger(0)
set DisASMObj = debugger.DisASMObj
If Not IsObject(ParameterObj) Then
MsgBox "Number of parameters wrong"
Exit Sub
End If
If IsNumeric(File) Then
MsgBox "File parameter wrong - " &amp; File
Exit Sub
End If
DisASMObj.OutputPath = CStr(File)
bRetVal = DisASMObj.CreateStream(True,"UDE Disassembler output of current Program",False)
If bRetVal = True Then
ParmeterCnt = ParameterObj.ParameterCount
If ParmeterCnt = 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
If ( ParmeterCnt Mod 3 ) &lt;&gt; 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
RangeCnt = ParmeterCnt/3
ParamIndex = 0
For Range = 0 To RangeCnt -1
KindOfRange = CStr(ParameterObj.Parameter(ParamIndex))
KindOfRange = UCase(KindOfRange)
Address = CLng(ParameterObj.Parameter(ParamIndex +1))
Length = CLng(ParameterObj.Parameter(ParamIndex +2))
ParamIndex = ParamIndex +3
If IsNumeric(KindOfRange) Then
If KindOfRange = 12 Then
DisASMObj.AddRange Address,Length,1
ElseIf KindOfRange = 219 Then
DisASMObj.AddRange Address,Length,2
ElseIf KindOfRange = 221 Then
DisASMObj.AddRange Address,Length,4
Else
MsgBox "Invalid range type " &amp; KindOfRange &amp; "of range " &amp; Range +1
Exit Sub
End If
Else
If KindOfRange = "C" Then
DisASMObj.AddRange Address,Length,1
ElseIf KindOfRange = "DB" Then
DisASMObj.AddRange Address,Length,2
ElseIf KindOfRange = "DW" Then
DisASMObj.AddRange Address,Length,3
ElseIf KindOfRange = "DD" Then
DisASMObj.AddRange Address,Length,4
Else
MsgBox "Invalid range type " &amp; KindOfRange &amp; "of range " &amp; Range +1
Exit Sub
End If
End If
Next
DisASMObj.HexFileModeFlag = False
DisASMObj.ListModeFlag = False
DisASMObj.WriteAllRanges(False)
End If
End Sub
'_______________________________________________________
'
' SaveHEX command line function
'
' generates intel-HEX file
'
' command line SaveHex output-file range1 [range2] [range3] .....
' range description:
' &lt;startaddress&gt;,&lt;length&gt;
'_______________________________________________________
Sub SaveHEX(File,ParameterObj)
set debugger = workspace.Coredebugger(0)
set DisASMObj = debugger.DisASMObj
If Not IsObject(ParameterObj) Then
MsgBox "Number of parameters wrong"
Exit Sub
End If
If IsNumeric(File) Then
MsgBox "File parameter wrong - " &amp; File
Exit Sub
End If
DisASMObj.OutputPath = CStr(File)
bRetVal = DisASMObj.CreateStream(True,"UDE generated intel-Hex file of current Program",False)
If bRetVal = True Then
ParmeterCnt = ParameterObj.ParameterCount
If ParmeterCnt = 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
If ( ParmeterCnt Mod 2 ) &lt;&gt; 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
RangeCnt = ParmeterCnt/2
ParamIndex = 0
For Range = 0 To RangeCnt -1
Address = CLng(ParameterObj.Parameter(ParamIndex))
Length = CLng(ParameterObj.Parameter(ParamIndex +1))
ParamIndex = ParamIndex +2
DisASMObj.AddRange Address,Length,0
Next
DisASMObj.HexFileModeFlag = True
DisASMObj.WriteAllRanges(False)
End If
End Sub
'_______________________________________________________
'
' FillByte command line function
'
' fills memory range with byte pattern
'
' command line FillByte range1,pattern1 [range2,pattern2] [range3,pattern3] .....
' range description:
' &lt;startaddress&gt;,&lt;length&gt;
'_______________________________________________________
Sub FillByte(ParameterObj)
set debugger = workspace.Coredebugger(0)
set DisASMObj = debugger.DisASMObj
If Not IsObject(ParameterObj) Then
MsgBox "Number of parameters wrong"
Exit Sub
End If
ParmeterCnt = ParameterObj.ParameterCount
If ParmeterCnt = 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
If ( ParmeterCnt Mod 3 ) &lt;&gt; 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
RangeCnt = ParmeterCnt/3
ParamIndex = 0
set udearrayobj = debugger.ByteArrayObj(1)
For Range = 0 To RangeCnt -1
Address = CLng(ParameterObj.Parameter(ParamIndex))
Length = CLng(ParameterObj.Parameter(ParamIndex +1))
Pattern = CLng(ParameterObj.Parameter(ParamIndex +2))
ParamIndex = ParamIndex +3
udearrayobj.Resize(Length)
udearrayobj.Fill(Pattern)
debugger.Write Address,udearrayobj
Next
End Sub
'_______________________________________________________
'
' FillWord command line function
'
' fills memory range with word pattern
'
' command line FillWord range1,pattern1 [range2,pattern2] [range3,pattern3] .....
' range description:
' &lt;startaddress&gt;,&lt;length&gt;
'_______________________________________________________
Sub FillWord(ParameterObj)
set debugger = workspace.Coredebugger(0)
set DisASMObj = debugger.DisASMObj
If Not IsObject(ParameterObj) Then
MsgBox "Number of parameters wrong"
Exit Sub
End If
ParmeterCnt = ParameterObj.ParameterCount
If ParmeterCnt = 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
If ( ParmeterCnt Mod 3 ) &lt;&gt; 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
RangeCnt = ParmeterCnt/3
ParamIndex = 0
set udearrayobj = debugger.WordArrayObj(1)
For Range = 0 To RangeCnt -1
Address = CLng(ParameterObj.Parameter(ParamIndex))
Length = CLng(ParameterObj.Parameter(ParamIndex +1)/2)
Pattern = CLng(ParameterObj.Parameter(ParamIndex +2))
ParamIndex = ParamIndex +3
udearrayobj.Resize(Length)
udearrayobj.Fill(Pattern)
debugger.Write Address,udearrayobj
Next
End Sub
'_______________________________________________________
'
' FillDWord command line function
'
' fills memory range with dword pattern
'
' command line FillDWord range1,pattern1 [range2,pattern2] [range3,pattern3] .....
' range description:
' &lt;startaddress&gt;,&lt;length&gt;
'_______________________________________________________
Sub FillDWord(ParameterObj)
set debugger = workspace.Coredebugger(0)
set DisASMObj = debugger.DisASMObj
If Not IsObject(ParameterObj) Then
MsgBox "Number of parameters wrong"
Exit Sub
End If
ParmeterCnt = ParameterObj.ParameterCount
If ParmeterCnt = 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
If ( ParmeterCnt Mod 3 ) &lt;&gt; 0 Then
MsgBox "Number of parameters wrong " &amp; ParmeterCnt
Exit Sub
End If
RangeCnt = ParmeterCnt/3
ParamIndex = 0
set udearrayobj = debugger.DWordArrayObj(1)
For Range = 0 To RangeCnt -1
Address = CLng(ParameterObj.Parameter(ParamIndex))
Length = CLng(ParameterObj.Parameter(ParamIndex +1)/4)
Pattern = CLng(ParameterObj.Parameter(ParamIndex +2))
ParamIndex = ParamIndex +3
udearrayobj.Resize(Length)
udearrayobj.Fill(Pattern)
debugger.Write Address,udearrayobj
Next
End Sub</ScriptSource><ScriptArchitecture type="int">63</ScriptArchitecture><ScriptEngine type="string">VBScript</ScriptEngine><MacroFileTime type="string">24.11.2006 14:43:20:000</MacroFileTime><ScriptFromStg type="flag">1</ScriptFromStg><LocalComputerName type="string">WS_CORE_DUO</LocalComputerName><ExternalScriptPath type="string"></ExternalScriptPath><NextNodeName type="string">Macro_14_06_13_14_48_10_0</NextNodeName><UnAss type="key"><GUIEntry type="key"><MenuID type="int">10</MenuID><MenuString type="string">Execute UnAss ..</MenuString><ToolTipString type="string">Macro UnAss</ToolTipString><MessageString type="string">Execute macro UnAss</MessageString><DebugFlag type="flag">0</DebugFlag></GUIEntry><FuncParameterCnt type="int">2</FuncParameterCnt><GUIEntryDescription type="string"></GUIEntryDescription></UnAss><SaveHEX type="key"><GUIEntry type="key"><MenuID type="int">10</MenuID><MenuString type="string">Execute SaveHEX ..</MenuString><ToolTipString type="string">Macro SaveHEX</ToolTipString><MessageString type="string">Execute macro SaveHEX</MessageString><DebugFlag type="flag">0</DebugFlag></GUIEntry><FuncParameterCnt type="int">2</FuncParameterCnt><GUIEntryDescription type="string"></GUIEntryDescription></SaveHEX><FillByte type="key"><GUIEntry type="key"><MenuID type="int">10</MenuID><MenuString type="string">Execute FillByte ..</MenuString><ToolTipString type="string">Macro FillByte</ToolTipString><MessageString type="string">Execute macro FillByte</MessageString><DebugFlag type="flag">0</DebugFlag></GUIEntry><FuncParameterCnt type="int">1</FuncParameterCnt><GUIEntryDescription type="string"></GUIEntryDescription></FillByte><FillWord type="key"><GUIEntry type="key"><MenuID type="int">10</MenuID><MenuString type="string">Execute FillWord ..</MenuString><ToolTipString type="string">Macro FillWord</ToolTipString><MessageString type="string">Execute macro FillWord</MessageString><DebugFlag type="flag">0</DebugFlag></GUIEntry><FuncParameterCnt type="int">1</FuncParameterCnt><GUIEntryDescription type="string"></GUIEntryDescription></FillWord><FillDWord type="key"><GUIEntry type="key"><MenuID type="int">10</MenuID><MenuString type="string">Execute FillDWord ..</MenuString><ToolTipString type="string">Macro FillDWord</ToolTipString><MessageString type="string">Execute macro FillDWord</MessageString><DebugFlag type="flag">0</DebugFlag></GUIEntry><FuncParameterCnt type="int">1</FuncParameterCnt><GUIEntryDescription type="string"></GUIEntryDescription></FillDWord><NoOfFunctions type="int">5</NoOfFunctions></Macro_14_06_13_14_33_25_0></MacroGuiEntries><LastSelectedMacro type="string"></LastSelectedMacro></UDE.Script></AddOns><MultiCoreRunControl type="key"><NoOfRunCtrlGroups type="int">0</NoOfRunCtrlGroups></MultiCoreRunControl><Core type="key"><ViewSrv type="key"><PowerPcCpuWin type="key"><SAVED_VIEW_OBJS type="int">1</SAVED_VIEW_OBJS><OPEN_VIEW type="key"><FrameCreated type="string">21.11.2012 14:17:23:645</FrameCreated><ViewSrv type="key"/><NETFrameMode type="int">77827</NETFrameMode><NETFrameSaveIndex type="int">5</NETFrameSaveIndex><FrameUserTitle type="string"></FrameUserTitle><CommonVisibilityGroup type="flag">0</CommonVisibilityGroup><VisibilityGroup_1 type="string">Target0.Controller0.Core</VisibilityGroup_1><VisibilityGroupsCnt type="int">1</VisibilityGroupsCnt></OPEN_VIEW><SAVED_VIEW type="int">0</SAVED_VIEW></PowerPcCpuWin><StdUDESymbolExplWin type="key"><OPEN_VIEW type="key"><FrameCreated type="string">20.11.2012 16:19:48:344</FrameCreated><ViewSrv type="key"/><NETFrameMode type="int">77826</NETFrameMode><NETFrameSaveIndex type="int">4</NETFrameSaveIndex><FrameUserTitle type="string"></FrameUserTitle><CommonVisibilityGroup type="flag">0</CommonVisibilityGroup><VisibilityGroup_1 type="string">Target0.Controller0.Core</VisibilityGroup_1><VisibilityGroupsCnt type="int">1</VisibilityGroupsCnt></OPEN_VIEW><SAVED_VIEW_OBJS type="int">1</SAVED_VIEW_OBJS><SAVED_VIEW type="int">0</SAVED_VIEW></StdUDESymbolExplWin><StdUDEProgWin type="key"><OPEN_VIEW00 type="key"><FrameCreated type="string">21.11.2012 12:22:49:573<