572 lines
14 KiB
Plaintext
572 lines
14 KiB
Plaintext
; --------------------------------------------------------------------------------
|
|
; @Title: SafeRTOS specific menu
|
|
; @Description: -
|
|
; @Keywords: safertos menu awareness
|
|
; @Author: DIE AME
|
|
; @Copyright: (c) 1989-2021 Lauterbach GmbH, licensed for use with TRACE32(R) only
|
|
; --------------------------------------------------------------------------------
|
|
; $Id: freertos.m 5915 2020-11-30 10:57:42Z amerkle $
|
|
|
|
NAME "TASK.SAFERTOS"
|
|
|
|
IF !MENU.EXIST("TASK.SAFERTOS")
|
|
(
|
|
|
|
add
|
|
menu
|
|
(
|
|
popup "SafeRTOS"
|
|
(
|
|
default
|
|
menuitem "Display &Tasks" "TASK.TaskList"
|
|
menuitem "Display &Queues"
|
|
(
|
|
if task.avail(qreg)!=0
|
|
TASK.Queue
|
|
else
|
|
(
|
|
dialog
|
|
(
|
|
header "Display Queue"
|
|
pos 0x1 0x1 30.
|
|
addr: defedit "" ""
|
|
pos 32. 1. 7.
|
|
button "Browse..."
|
|
(
|
|
PRIVATE &wildcard
|
|
&wildcard=dialog.string(addr)
|
|
if "&wildcard"==""
|
|
&wildcard="*"
|
|
if !string.find("&wildcard","*?")
|
|
&wildcard="*&wildcard*"
|
|
sYmbol.Browse.Var &wildcard xQueueHandle /Static /Click "dialog.set addr ""*""" /Delete
|
|
)
|
|
pos 40. 1. 7.
|
|
defbutton "Ok"
|
|
(
|
|
PRIVATE &sAddr
|
|
&sAddr=dialog.string(addr)
|
|
TASK.Queue Var.Value(&sAddr)
|
|
dialog.end
|
|
)
|
|
pos 0. 0. 49. 3.
|
|
box "Queue"
|
|
)
|
|
)
|
|
)
|
|
menuitem "Display &Semaphores"
|
|
(
|
|
if task.avail(qreg)!=0
|
|
TASK.Semaphore
|
|
else
|
|
(
|
|
dialog
|
|
(
|
|
header "Display Semaphore"
|
|
pos 0x1 0x1 30.
|
|
addr: defedit "" ""
|
|
pos 32. 1. 7.
|
|
button "Browse..."
|
|
(
|
|
PRIVATE &wildcard
|
|
&wildcard=dialog.string(addr)
|
|
if "&wildcard"==""
|
|
&wildcard="*"
|
|
if !string.find("&wildcard","*?")
|
|
&wildcard="*&wildcard*"
|
|
sYmbol.Browse.Var &wildcard xSemaphoreHandle /Static /Click "dialog.set addr ""*""" /Delete
|
|
)
|
|
pos 40. 1. 7.
|
|
defbutton "Ok"
|
|
(
|
|
PRIVATE &sAddr
|
|
&sAddr=dialog.string(addr)
|
|
TASK.Semaphore Var.Value(&sAddr)
|
|
dialog.end
|
|
)
|
|
pos 0. 0. 49. 3.
|
|
box "Semaphore"
|
|
)
|
|
)
|
|
)
|
|
menuitem "Display &Timers" "TASK.TImer"
|
|
menuitem "Display &Event Group..."
|
|
(
|
|
dialog
|
|
(
|
|
header "Display Event Group"
|
|
pos 0x1 0x1 30.
|
|
var: defedit "" ""
|
|
pos 32. 1. 7.
|
|
button "Browse..."
|
|
(
|
|
PRIVATE &wildcard
|
|
&wildcard=dialog.string(var)
|
|
if "&wildcard"==""
|
|
&wildcard="*"
|
|
if !string.find("&wildcard","*?")
|
|
&wildcard="*&wildcard*"
|
|
sYmbol.Browse.Var &wildcard EventGroupHandleType /Static /Click "dialog.set var ""*""" /Delete
|
|
)
|
|
pos 40. 1. 7.
|
|
defbutton "Ok"
|
|
(
|
|
PRIVATE &var
|
|
&var=dialog.string(var)
|
|
ON ERROR CONTinue
|
|
ERROR.RESet
|
|
SILENT.TASK.EvtGrp Var.VALUE(&var)
|
|
IF ERROR.OCCURRED()
|
|
SILENT.TASK.EvtGrp Var.ADDRESS(&var)
|
|
ON ERROR inherit
|
|
PRINT ""
|
|
DIALOG.END
|
|
)
|
|
pos 0. 0. 49. 3.
|
|
box "Event Group"
|
|
)
|
|
)
|
|
menuitem "Display &Stream Buffer..."
|
|
(
|
|
dialog
|
|
(
|
|
header "Display Stream Buffer"
|
|
pos 0x1 0x1 30.
|
|
var: defedit "" ""
|
|
pos 32. 1. 7.
|
|
button "Browse..."
|
|
(
|
|
PRIVATE &wildcard
|
|
&wildcard=dialog.string(var)
|
|
if "&wildcard"==""
|
|
&wildcard="*"
|
|
if !string.find("&wildcard","*?")
|
|
&wildcard="*&wildcard*"
|
|
sYmbol.Browse.Var &wildcard StreamBufferHandle_t /Static /Click "dialog.set var ""*""" /Delete
|
|
)
|
|
pos 40. 1. 7.
|
|
defbutton "Ok"
|
|
(
|
|
PRIVATE &var
|
|
&var=dialog.string(var)
|
|
TASK.StrBuf var.value(&var)
|
|
dialog.end
|
|
)
|
|
pos 0. 0. 49. 3.
|
|
box "Stream Buffer"
|
|
)
|
|
)
|
|
menuitem "Display &Message Buffer..."
|
|
(
|
|
dialog
|
|
(
|
|
header "Display Message Buffer"
|
|
pos 0x1 0x1 30.
|
|
var: defedit "" ""
|
|
pos 32. 1. 7.
|
|
button "Browse..."
|
|
(
|
|
PRIVATE &wildcard
|
|
&wildcard=dialog.string(var)
|
|
if "&wildcard"==""
|
|
&wildcard="*"
|
|
if !string.find("&wildcard","*?")
|
|
&wildcard="*&wildcard*"
|
|
sYmbol.Browse.Var &wildcard MessageBufferHandle_t /Static /Click "dialog.set var ""*""" /Delete
|
|
)
|
|
pos 40. 1. 7.
|
|
defbutton "Ok"
|
|
(
|
|
PRIVATE &var
|
|
&var=dialog.string(var)
|
|
TASK.MsgBuf var.value(&var)
|
|
dialog.end
|
|
)
|
|
pos 0. 0. 49. 3.
|
|
box "Message Buffer"
|
|
)
|
|
)
|
|
IF PRACTICE.FUNCtion.AVAILable(SYStem.Option.MACHINESPACES)
|
|
(
|
|
IF !SYStem.Option.MACHINESPACES()
|
|
(
|
|
MENUITEM "[ X X X X X,XXXXXXXXXXXX, XxxxxxxxxXs,XXxxxxxxxxXs, XxxxxxxxxXX,XXxxxxxxxxXs, XxxxxxxxxXX,XXxxxxSSSSSSSS, XxxxxSBBwwwwwS,XXxxxxSBBwwwXwBS, XXXXXSBBwwwwwBB, XsXsXSBBBBBBBBB, SBBWWWWWBB, SBBWWWWWBB, SBBWRRRWBB, BBWWWWWBB]Generate RAM Dump"
|
|
(
|
|
PRIVATE &sPath
|
|
&sPath=OS.FILE.JOINPATH(TASK.GETDIR(),"ramdump.cmm")
|
|
IF OS.FILE("&sPath")
|
|
(
|
|
DO "&sPath" /DIALOG
|
|
ENDDO
|
|
)
|
|
PRINT %ERROR "File ""ramdump.cmm"" not found. Please contact support@lauterbach.com ."
|
|
)
|
|
)
|
|
)
|
|
ELSE
|
|
(
|
|
MENUITEM "[ X X X X X,XXXXXXXXXXXX, XxxxxxxxxXs,XXxxxxxxxxXs, XxxxxxxxxXX,XXxxxxxxxxXs, XxxxxxxxxXX,XXxxxxSSSSSSSS, XxxxxSBBwwwwwS,XXxxxxSBBwwwXwBS, XXXXXSBBwwwwwBB, XsXsXSBBBBBBBBB, SBBWWWWWBB, SBBWWWWWBB, SBBWRRRWBB, BBWWWWWBB]Generate RAM Dump"
|
|
(
|
|
PRIVATE &sPath
|
|
&sPath=OS.FILE.JOINPATH(TASK.GETDIR(),"ramdump.cmm")
|
|
IF OS.FILE("&sPath")
|
|
(
|
|
DO "&sPath" /DIALOG
|
|
ENDDO
|
|
)
|
|
PRINT %ERROR "File ""ramdump.cmm"" not found. Please contact support@lauterbach.com ."
|
|
)
|
|
)
|
|
separator
|
|
popup "&Stack Coverage"
|
|
(
|
|
menuitem "&List Stacks"
|
|
(
|
|
if !ice()&&!fire()
|
|
TASK.STacK.PATtern 0x0
|
|
TASK.STacK.view
|
|
)
|
|
menuitem "Add Task" "TASK.STacK.ADD"
|
|
menuitem "Remove Task" "TASK.STacK.RM"
|
|
enable ice()||fire()
|
|
menuitem "&Reset Coverage" "TASK.STacK.RESet"
|
|
)
|
|
)
|
|
popup "Trace"
|
|
(
|
|
popup "List"
|
|
(
|
|
separator
|
|
menuitem "&Task Switches" "Trace.List List.TASK"
|
|
menuitem "&Default and Tasks" "Trace.List List.TASK DEFault"
|
|
)
|
|
)
|
|
popup "Perf"
|
|
(
|
|
separator
|
|
popup "&Task Runtime"
|
|
(
|
|
menuitem "&Prepare"
|
|
(
|
|
if t.method.analyzer()
|
|
(
|
|
Analyzer.AutoInit on
|
|
)
|
|
if (ice()||fire())&&!a.mode.flow()
|
|
(
|
|
Analyzer.ReProgram
|
|
(
|
|
Sample.Enable if AlphaBreak&&Write
|
|
)
|
|
Break.Delete /Alpha
|
|
Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha
|
|
)
|
|
if a.mode.flow()
|
|
(
|
|
Break.Delete /TraceEnable
|
|
Break.Set task.config(magic) /TraceEnable
|
|
)
|
|
)
|
|
menuitem "[:perf]Show &Numerical" "Trace.STATistic.TASK"
|
|
menuitem "[:achart]Show as &Timing" "Trace.CHART.TASK"
|
|
menuitem "[:achart]Tracking with Trace &List"
|
|
(
|
|
Trace.List List.TASK DEFault /Track
|
|
Trace.CHART.TASK /Track
|
|
)
|
|
)
|
|
popup "Task &Function Runtime"
|
|
(
|
|
menuitem "&Prepare"
|
|
(
|
|
if t.method.analyzer()
|
|
(
|
|
Analyzer.AutoInit on
|
|
Analyzer.STATistic.PreFetch on
|
|
)
|
|
|
|
if (ice()||fire())&&!a.mode.flow()
|
|
(
|
|
if a.config.hac()
|
|
(
|
|
Analyzer.ReProgram
|
|
(
|
|
Sample.Enable if AlphaBreak
|
|
Sample.Enable if BetaBreak
|
|
Mark.A if AlphaBreak
|
|
Mark.B if BetaBreak
|
|
)
|
|
)
|
|
else
|
|
(
|
|
Analyzer.ReProgram
|
|
(
|
|
Sample.Enable if AlphaBreak||BetaBreak
|
|
Mark.A if AlphaBreak
|
|
Mark.B if BetaBreak
|
|
)
|
|
)
|
|
Break.Delete /Alpha /Beta /Charly
|
|
Break.SetFunc
|
|
Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha
|
|
)
|
|
if a.mode.flow()
|
|
(
|
|
Break.Delete /TraceData
|
|
Break.Set task.config(magic) /TraceData
|
|
)
|
|
)
|
|
menuitem "[:perf]Show &Numerical" "Trace.STATistic.TASKFUNC"
|
|
menuitem "[:perf]Show as &Tree" "Trace.STATistic.TASKTREE"
|
|
menuitem "[:perf]Show &Detailed Tree" "Trace.STATistic.TASKTREE ALL"
|
|
menuitem "[:achart]Show as &Timing" "Trace.CHART.TASKFUNC"
|
|
menuitem "[:alist]Show N&esting" "Trace.List List.TASK FUNC TI.FUNC"
|
|
)
|
|
;popup "Task &Status"
|
|
;(
|
|
; menuitem "&Prepare"
|
|
; (
|
|
; if t.method.analyzer()
|
|
; (
|
|
; Analyzer.AutoInit on
|
|
; )
|
|
; if (ice()||fire())&&!a.mode.flow()
|
|
; (
|
|
; Analyzer.ReProgram
|
|
; (
|
|
; Sample.Enable if AlphaBreak&&Write
|
|
; )
|
|
; Break.Delete /Alpha
|
|
; Break.Set task.config(magic)++(task.config(magicsize)-1) /Alpha
|
|
; TASK.TASKState
|
|
; )
|
|
; )
|
|
; menuitem "[:perf]Show &Numerical" "Trace.STATistic.TASKSTATE"
|
|
; menuitem "[:achart]Show as &Timing" "Trace.CHART.TASKSTATE"
|
|
; menuitem "[:achart]Tracking with Trace &List"
|
|
; (
|
|
; Trace.List List.TASK DEFault /Track
|
|
; Trace.CHART.TASKSTATE /Track
|
|
; )
|
|
;)
|
|
)
|
|
popup "&Help"
|
|
(
|
|
MENUITEM "[:manual]OS Awareness Manual Linux" "HELP __RTOS_FREERTOS_"
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.tl"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.TaskList &nMagic
|
|
)
|
|
menuitem "Display task struct"
|
|
(
|
|
PRIVATE &pAddress &sStruct
|
|
&pAddress=track.address()
|
|
&sStruct=task.struct(tcb)
|
|
Var.View %Open %String (&sStruct*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Display Stack Frame"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
Var.Frame /Locals /Caller /Task &nMagic
|
|
)
|
|
menuitem "Display Registers"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
Register /Task &nMagic
|
|
)
|
|
menuitem "Switch Context"
|
|
(
|
|
PRIVATE &nAddress
|
|
&nAddress=ADDRESS.OFFSET(TRACK.ADDRESS())
|
|
Register.TASK &nAddress
|
|
)
|
|
separator
|
|
menuitem "Add to Stack Cov"
|
|
(
|
|
PRIVATE &nAddress
|
|
&nAddress=ADDRESS.OFFSET(TRACK.ADDRESS())
|
|
TASK.STacK.ADD &nAddress
|
|
)
|
|
menuitem "Rm from Stack Cov"
|
|
(
|
|
PRIVATE &nAddress
|
|
&nAddress=ADDRESS.OFFSET(TRACK.ADDRESS())
|
|
TASK.STacK.RM &nAddress
|
|
)
|
|
separator
|
|
menuitem "Dump task entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.q"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.Queue &nMagic
|
|
)
|
|
menuitem "Display queue struct"
|
|
(
|
|
PRIVATE &pAddress &sStruct
|
|
&pAddress=track.address()
|
|
&sStruct=task.struct(queue)
|
|
Var.View %Open %String (&sStruct*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Dump queue entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.s"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.Semaphore &nMagic
|
|
)
|
|
menuitem "Display semaphore struct"
|
|
(
|
|
PRIVATE &pAddress &sStruct
|
|
&pAddress=track.address()
|
|
&sStruct=task.struct(queue)
|
|
Var.View %Open %String (&sStruct*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Dump semaphore entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.ti"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.TImer &nMagic
|
|
)
|
|
menuitem "Display timer struct"
|
|
(
|
|
PRIVATE &pAddress &sStruct
|
|
&pAddress=track.address()
|
|
&sStruct=task.struct(timer)
|
|
Var.View %Open %String (&sStruct*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Dump timer entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.eg"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.EvtGrp &nMagic
|
|
)
|
|
menuitem "Display event group struct"
|
|
(
|
|
PRIVATE &pAddress &sStruct
|
|
&pAddress=track.address()
|
|
&sStruct=task.struct(eventgroup)
|
|
Var.View %Open (&sStruct*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Dump event group entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.sb"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.StrBuf &nMagic
|
|
)
|
|
menuitem "Display stream buffer struct"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Var.View %Open (StreamBuffer_t*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Dump stream buffer entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
|
|
menu "task.mb"
|
|
(
|
|
default
|
|
menuitem "Display detailed"
|
|
(
|
|
PRIVATE &nMagic
|
|
&nMagic=address.offset(track.address())
|
|
TASK.MsgBuf &nMagic
|
|
)
|
|
menuitem "Display message buffer struct"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Var.View %Open (StreamBuffer_t*)(&pAddress)
|
|
)
|
|
separator
|
|
menuitem "Dump message buffer entry"
|
|
(
|
|
PRIVATE &pAddress
|
|
&pAddress=track.address()
|
|
Data.dump &pAddress /Long /DIALOG
|
|
)
|
|
)
|
|
|
|
)
|