keyboard/qmk/lib/chibios/demos/SPC5/RT-SPC56EC-EVB/UDE/debug.wsx

274 lines
49 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">0</WspCloseCnt><ProdInfo type="bin" size="52">vQTv/gAAAQAXAAIA8QkPAAAABAAAAAAAPwAAAAAAAAAEAAAAAgAAAAAAAAAAAAAAAAAAAA==</ProdInfo><ProdInfoString type="string">4.0</ProdInfoString><CreationDate type="string">28.08.2013 14:58:49:999</CreationDate><MainFrame type="key"><VisibilityGroupsMgr type="key"><Core0 type="key"><UsePrimaryGroup type="flag">0</UsePrimaryGroup><UseLastUsedGroup type="flag">0</UseLastUsedGroup></Core0><Core1 type="key"><UsePrimaryGroup type="flag">0</UsePrimaryGroup><UseLastUsedGroup type="flag">0</UseLastUsedGroup></Core1><EnableVisibilityGroups type="flag">0</EnableVisibilityGroups><VisibilityGroup_1 type="key"><NoOfDebugger type="int">0</NoOfDebugger><DefaultGroupName type="string">WorkspaceManager</DefaultGroupName><GroupName type="string">WorkspaceManager</GroupName><PrimaryGroup type="flag">0</PrimaryGroup><CommonGroup type="flag">1</CommonGroup></VisibilityGroup_1><VisibilityGroup_2 type="key"><Debugger_1 type="string">Core0</Debugger_1><NoOfDebugger type="int">1</NoOfDebugger><DefaultGroupName type="string">Target0.Controller0.Core0</DefaultGroupName><GroupName type="string">Target0.Controller0.Core0</GroupName><PrimaryGroup type="flag">1</PrimaryGroup><CommonGroup type="flag">0</CommonGroup></VisibilityGroup_2><VisibilityGroup_3 type="key"><Debugger_1 type="string">Core1</Debugger_1><NoOfDebugger type="int">1</NoOfDebugger><DefaultGroupName type="string">Target0.Controller0.Core1</DefaultGroupName><GroupName type="string">Target0.Controller0.Core1</GroupName><PrimaryGroup type="flag">1</PrimaryGroup><CommonGroup type="flag">0</CommonGroup></VisibilityGroup_3><NoOfDefaultVisibilityGroups type="int">3</NoOfDefaultVisibilityGroups><NoOfVisibilityGroups type="int">3</NoOfVisibilityGroups><EnableUserSwitchOfVisibilityGroups type="flag">0</EnableUserSwitchOfVisibilityGroups><EnableDebuggerSwitchOfVisibilityGroups type="flag">0</EnableDebuggerSwitchOfVisibilityGroups><VisibilityGroupsCtrlTBCat type="int">7</VisibilityGroupsCtrlTBCat></VisibilityGroupsMgr><NETPlacementRoot type="key"><FormsData type="innerxml"><FormsData><Bounds><X>63</X><Y>21</Y><Width>1296</Width><Height>818</Height></Bounds><ClientSize><Width>1280</Width><Height>780</Height></ClientSize><State>Normal</State></FormsData></FormsData><DockingManagerControlData type="innerxml"><DockingManagerControlData><MDIActive>false</MDIActive><DocumentDockStyle>Top</DocumentDockStyle><DockingControls><DockingControlData><DockedDimension>1272</DockedDimension><Cancelled>false</Cancelled><DockingType>Bottom</DockingType><FloatingBounds><X>0</X><Y>0</Y><Width>0</Width><Height>0</Height></FloatingBounds><AutoHide>false</AutoHide><AutoHideByContextSwitch>false</AutoHideByContextSwitch><DockingIndex>0</DockingIndex><PanelIndex>0</PanelIndex><ContainerType>DockPanel</ContainerType><Selected>true</Selected></DockingControlData><DockingControlData><DockedDimension>457</DockedDimension><Cancelled>false</Cancelled><DockingType>Left</DockingType><FloatingBounds><X>0</X><Y>0</Y><Width>0</Width><Height>0</Height></FloatingBounds><AutoHide>false</AutoHide><AutoHideByContextSwitch>false</AutoHideByContextSwitch><DockingIndex>0</DockingIndex><PanelIndex>0</PanelIndex><ContainerType>DockPanel</ContainerType><Selected>false</Selected></DockingControlData><DockingControlData><DockedDimension>457</DockedDimension><Cancelled>false</Cancelled><DockingType>Left</DockingType><FloatingBounds><X>0</X><Y>0</Y><Width>0</Width><Height>0</Height></FloatingBounds><AutoHide>false</AutoHide><AutoHideByContextSwitch>false</AutoHideByContextSwitch><DockingIndex>1</DockingIndex><PanelIndex>0</PanelIndex><ContainerType>DockPanel</ContainerType><Selected>false</Selected></DockingControlData><DockingControlData><DockedDimension>0</DockedDimension><Cancelled>false</Cancelled><DockingType>Top</DockingType><FloatingBounds><X>0</X><Y>0</Y><Width>0</Width><Height>0</Height></FloatingBounds><AutoHide>false</AutoHide><AutoHideByContextSwitch>
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_24_02_14_14_13_33_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_24_09_13_12_19_33_0></MacroGuiEntries><LastSelectedMacro type="string"></LastSelectedMacro></UDE.Script></AddOns><MultiCoreRunControl type="key"><NoOfRunCtrlGroups type="int">0</NoOfRunCtrlGroups></MultiCoreRunControl><Core0 type="key"><ViewSrv type="key"><PowerPcCpuWin type="key"><SAVED_VIEW_OBJS type="int">1</SAVED_VIEW_OBJS><OPEN_VIEW type="key"><FrameCreated type="string">28.08.2013 15:32:24:478</FrameCreated><ViewSrv type="key"/><NETFrameMode type="int">77826</NETFrameMode><NETFrameSaveIndex type="int">5</NETFrameSaveIndex><FrameUserTitle type="string"></FrameUserTitle><CommonVisibilityGroup type="flag">0</CommonVisibilityGroup><VisibilityGroup_1 type="string">Target0.Controller0.Core0</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">28.08.2013 15:00:07:176</FrameCreated><ViewSrv type="key"/><NETFrameMode type="int">77827</NETFrameMode><NETFrameSaveIndex type="int">4</NETFrameSaveIndex><FrameUserTitle type="string"></FrameUserTitle><CommonVisibilityGroup type="flag">0</CommonVisibilityGroup><VisibilityGroup_1 type="string">Target0.Controller0.Core0</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"><SAVED_VIEW_OBJS type="int">2</SAVED_VIEW_OBJS><OPEN_VIEW00 type="key"><F