7.2 Creating a DS-5 Debugger script

Shows a typical example of a DS-5 Debugger script.

The script file must contain only one command on each line. Each command can be identified with comments if required. The .ds file extension must be used to identify this type of script.

# Filename: myScript.ds
# Initialization commands
load "struct_array.axf"       # Load image
file "struct_array.axf"       # Load symbols
break main                    # Set breakpoint at main()
break *0x814C                 # Set breakpoint at address 0x814C
# Run to breakpoint and print required values
run                           # Start running device
wait 0.5s                     # Wait or time-out after half a second
info stack                    # Display call stack
info registers                # Display info for all registers
# Continue to next breakpoint and print required values
continue                      # Continue running device
wait 0.5s                     # Wait or time-out after half a second
info functions                # Displays info for all functions
info registers                # Display info for all registers
x/3wx 0x8000                  # Display 3 words of memory from 0x8000 (hex)
...
# Shutdown commands
delete 1                      # Delete breakpoint assigned number 1
delete 2                      # Delete breakpoint assigned number 2
Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.