Yes. TRACE32 provides the TASK.STacK command group for this purpose. To measure stack usage, you need to:
Define the stack range using
TASK.STacK.ADD.Initialize the stack memory with a known pattern (commonly
0xA5).
Example (Arm Instruction Set Simulator)
RESet
SYStem.RESet
SYStem.CPU CortexA9
SYStem.Up
DO ~~/demo/arm/compiler/gnu-pic/demo_sieve
; initialize the stack with a specific pattern
; use section .stack here
Data.Set sYmbol.SECRANGE(.stack) %Byte 0xa5
Go main\1
WAIT !STATE.RUN()
; add stacks manually
TASK.STacK.PATtern %Byte 0xa5
TASK.STacK.view
; use any number as "task" identifier, e.g. here 0x100
TASK.STacK.ADD 0x100 sYmbol.SECRANGE(.stack)
; possibly add more stacks: TASK.STacK.ADD
; [optional] set a name:
TASK.NAME.Set 0x100 "main"The TASK.STacK.view command can then be used to display the stack usage:
Add a comment