|Non-Confidential||PDF version||ARM DUI0446Z|
|Home > Debugging with Scripts > Creating a CMM-style script|
DS-5 provides a small subset of CMM-style commands which you can use to create a CMM-style script.
The debugger script file must conform to the following standards:
After creating your script, you must use the DS-5 Debugger source command to load and run the script.
The example below shows a typical CMM-style 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