Yes. TRACE32 provides the ON and GLOBALON commands to define actions that are automatically executed when a specific event occurs.
The general syntax is:
ON|GLOBALON <event> <action>The difference between the two commands is:
ONcreates an event handler that is active only while the current PRACTICE script is running. It is typically used when a script controls a test sequence and needs to react to specific events.GLOBALONcreates a persistent event handler that remains active until it is explicitly disabled. It is useful for reactions that should stay enabled independently of the currently running PRACTICE script.
For a complete list of supported events and actions, refer to the descriptions of the ON and GLOBALON commands in the General Commands Reference Guide O and the General Commands Reference Guide G.
To remove an event handler, use:
ON|GLOBALON <event> inheritExamples
1. Execute a PRACTICE script when program execution stops:
GLOBALON PBREAK DO myscript.cmm2. Continue PRACTICE script execution when an error occurs:
ON ERROR CONTinue3. Execute the subroutine powerup_handler when target power is switched on:
ON POWERUP GOSUB powerup_handler
Add a comment