Creating a CMM-style script
Shows a typical example of a CMM-style script.
The script file must contain only one command on each line. Each command can be identified with comments if required. The .cmm or .t32 file extension must be used to identify this type of script.
// Filename: myScript.cmm system.up ; Connect to target and device data.load.elf "hello.axf" ; Load image and symbols // Setup breakpoints and registers break.set main /disable ; Set breakpoint and immediately disabled break.set 0x8048 ; Set breakpoint at specified address break.set 0x8060 ; Set breakpoint at specified address register.set R0 15 ; Set register R0 register.set PC main ; Set PC register to symbol address ... break.enable main ; Enable breakpoint at specified symbol // Run to breakpoint and display required values go ; Start running device var.print "Value is: " myVar ; Display string and variable value print %h r(R0) ; Display register R0 in hexadecimal // Run to breakpoint and print stack go ; Run to next breakpoint var.frame /locals /caller ; Display all variables and function callers ... // Shutdown commands break.delete main ; Delete breakpoint at address of main() break.delete 0x8048 ; Delete breakpoint at address break.delete 0x8060 ; Delete breakpoint at specified address system.down ; Disconnect from target