SourcePoint AMD Help

Table of Contents

Command Window Introduction

The Command window provides a command line interface to SourcePoint. ย Commands may be typed one at a time, or multiple commands can be executed from a command file.

The Command window displays a history of previously executed commands and their responses. ย 

This section describes the Command window itself. ย For a detailed description of the SourcePoint command language, refer to SourcePoint Command Language in the Table of Contents.

The Command Window

To open the Command window, select View | Command on the menu bar or click the Command window icon on the toolbar.

Command window

Entering Commands

Commands are entered at the prompt. ย In single processor systems the prompt is the โ€™>โ€™ character. ย In multi-processor systems the prompt is the current viewpoint processor name followed by the โ€™>โ€™ character (e.g., P0>). ย 

To execute a new command, type the command at the prompt and press Enter. ย If the command generates a response (e.g., a memory read operation) it will be displayed on the next line. ย 

Commands are colored black, response data is colored blue, and errors are colored red. ย These colors can be changed by selecting Options | Preferences | Color.

Command History

The Command window displays a history of previously executed commands and their responses. ย There are two ways to execute a previously executed command:

  1. Scroll to the command, left click anywhere in it, and press Enter.

  2. While at the command prompt, use the up and down arrow keys to scroll through the command history. ย Pressing Enter will re-execute the displayed command.

Previously executed commands can also be edited to create new commands. ย Simply find the command, edit it, and press Enter. ย Command responses are not editable.

The Command window history can be cleared by selecting Clear Command Window from the context menu.

Editing Commands

Following is a list of keys that can be used for editing or recalling commands.

ย 

Up Arrow

At the command prompt moves back one command in the command history. ย Anywhere else in the window, moves the caret up one line.

Down Arrow

At the command prompt moves ahead one command in the command history. ย Anywhere else in the window, moves the caret down one line.

Page Up

At the command prompt recalls the oldest command in the command history. ย Anywhere else in the window, scrolls back one page.

Page Down

At the command prompt recalls the newest command in the command history. ย Anywhere else in the window, scrolls forward one page.

Right Arrow

Move one character to the right.

Left Arrow

Move one character to the left

Ctrl+Right

Move one word to the right

Ctrl+Left

Move one word to the left

Home

Move to the beginning of the current command

End

Move to the end of the current command

Ctrl+Home

Move to the beginning of the Command window

Ctrl+End

Move to the end of the Command window

Esc

Erases the current command

Enter

Execute the current command

Backspace

Erase the character prior to the caret

Del

Erase the character at the caret

Ctrl+C

Copy the currently selected text to the clipboard

Ctrl+X

Delete the currently selected text and copy it to the clipboard

Ctrl+V

Paste the contents of the clipboard at the caret location

Ctrl+Break

Exit line continuation mode, or cancel a currently running command file

Line Continuation

Line continuation means that a command spans multiple lines. ย When in line continuation mode the prompt shows โ€™>>โ€™ rather than โ€™>โ€™. ย There are two types of line continuation:

  1. When SourcePoint detects that a partial command has been entered, it will automatically enter line continuation mode (e.g., typing if (x), and then pressing Enter). ย As additional lines are typed, SourcePoint will determine if the command is complete, and then will automatically exit line continuation mode, and execute the command.

  2. Typing โ€™\โ€™ at the end of a line will force SourcePoint into line continuation mode. ย This is rarely used while typing commands, but is useful for long printf statements in command files.

Line continuation mode can be forced off by pressing Ctrl+Break.

Entering Multiple Commands as a Single Command

Multiple commands can be entered as a single command by using โ€™;โ€™ as a delimiter (e.g., stop; ord4 0x1000; go).

Copy / Paste

The Command window supports cut, copy, and paste operations. ย These operations can be selected from the Edit menu, the Command window context menu, or by pressing Ctrl+X, Ctrl+C or Ctrl+V.

Text can be selected by left clicking and moving the mouse, or by double left clicking to select a word.

Pasting a command into the Command window causes it to be executed immediately. ย Pasting multiple commands executes all of the commands immediately.

Drag / Drop

The Command window supports two types of drag and drop operations:

  1. If a command file is dragged from Windows Explorer, and dropped into the Command window, SourcePoint will execute the command file.

  2. If a program file is dragged from Windows Explorer, and dropped into the Command window, SourcePoint will load the file as if the Load command had been used.

Command Files

Command files are text files containing multiple commands. ย Creating command files helps to automate oft-repeated operations. ย Command files are also referred to as macro files, script files and include files. ย There are several ways to execute a command file:

  1. Use the include command in the Command window (see Commands manual).

  2. Drag and drop a command file from Windows Explorer to the Command window.

  3. Select File | Macro | Load Macro from the main menu.

  4. Select File | Macro | Configure Macros to attach a command file to a user-defined toolbar button, and then press the button.

  5. Select File | Macro | Configure Macros to attach a command file to an event. ย Examples of events include: go, stop, project load, power cycle, etc. ย When the event occurs the macro will automatically execute.

  6. Define a breakpoint and specify a command file to execute when the breakpoint hits.

Recently executed macro files are shown in File | Recent Macros. ย Selecting a command file from this list will re-execute the file. ย Breakpoint and event macros are excluded from this list.

When a command file is executing, the name of the file is shown in the SourcePoint Status bar (at the bottom of the SourcePoint window).

Aborting a Command File

Press Ctrl+Break to terminate a running command file.

Logging Commands and Responses to a File

Commands and their associated responses can be logged to a file. ย The log command begins logging while the nolog command ends logging. ย See the Commands manual for more information.

There are two other ways to copy Command window commands and responses to a text file:

  1. Use the mouse to select text in the Command window and then paste it into a text editor.

  2. Select File | Save As from the main menu to save all or a portion of the Command window to a file.

Printing the Command Window

All or a portion of the Command window can be printed. ย Select File | Print from the main menu or press Ctrl+P in the Command window.

Searching the Command Window

The Command window supports searching for old commands or response data. ย Select Edit | Find from the main menu, or press Ctrl+F in the Command window.

Executing an Operating System Command

The Shell command is used to execute commands outside of SourcePoint. ย There are two ways to use the command:

  1. Type Shell without any arguments to open an operating system command window. ย When the window closes, the focus switches back to the SourcePoint Command window.

  2. Type Shell with a command to execute the command and return immediately to SourcePoint.

Refer to shell in the Commands manual for more information.

Getting Help

There are two ways to access help from the Command window:

  1. Type Help or press F1 to open the SourcePoint Help window.

  2. Type Help โ€command nameโ€ to open the SourcePoint Help window with the command help topic already displayed.