15.1.2. Command scripts

You can create command scripts in the following ways:

You can also create a command script from a journal file. However, you must edit the contents of the file to make sure any lines that do not contain CLI commands are commented out or removed.

Comments in command scripts

You can use comments in your command scripts. Any characters identified as belonging to a comment are ignored by RealView Debugger. The following rules apply to comments in command scripts:

  • C style comments begin with a slash followed by an asterisk (/*) and end with an asterisk followed by a slash (*/). Also the comment text and the delimiters must be on a single line:

    • valid comment

      /* comment */

      These comments appear in log and journal files.

    • invalid comment

      /*
         another comment
      */
      
  • C++ style comments begin with two slashes (//) and end when the end of the line is reached, for example:

    // This is a line comment
    // Copyright (c) ARM Limited
    
  • Comments that begin with //, but are not placed after a command, do not appear in any log and journal files.

  • Comments can begin with a semicolon (;), for example:

    ; A comment

  • Comments can begin with //# and end when the end of the line is reached.

  • Comments that begin with //#, but are not placed after a command, appear only in a journal file. Also, the //# prefix is replaced with ; in the that file.

  • Only // or //# comments can be placed at the end of a command, for example:

    ADD int value     // integer value
    
  • Comments cannot be nested.

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0153K
Non-Confidential