Skip to main content

IAR Embedded Workbench for RX 5.20

Programming assistance

In this section:

There are several features in the editor that assist you during your software development. This page describes various tasks related to using the editor.

Finding a definition or declaration of a symbol

To see the definition or declaration of a global symbol or a function, you can use these alternative methods:

  • In the editor window, right-click on a symbol and choose the Go to definition or Go to declaration command from the context menu that appears. If more than one declaration is found, the declarations are listed in the Declarations window from where you can navigate to a specific declaration.

  • In the Outline window, double-click on a symbol to view the definition

  • In the Outline window, right-click on a symbol, or function, and choose the Go to definition command from the context menu that appears

The definition of the symbol or function is displayed in the editor window.

Finding references to a symbol

To find all references for a specific symbol, select the symbol in the editor window, right-click and choose Find All References from the context menu. All found references are displayed in the References window.

You can now navigate between the references.

Finding function calls for a selected function

To find all calls to a function, select the function in the editor window or in the Outline window, right-click and choose Find All Calls to from the context menu. The result is displayed in the Call Graph window.

You can navigate between the function calls.

Switching between source and header files

If the insertion point is located on an #include line, you can choose the Open "header.h" command from the context menu, which opens the header file in an editor window. You can also choose the command Open Header/Source File, which opens the header or source file with a corresponding filename to the current file, or activates it if it is already open. This command is available if the insertion point is located on any line except an #include line.

Displaying source browse information

To open the Outline window, choose View>Source Browser>Outline. Source browse information is displayed for the active build configuration.

Text searching

There are several standard search functions available in the editor:

  • Quick search text box

  • Find dialog box

  • Replace dialog box

  • Find in Files dialog box

  • Replace in Files dialog box

  • Incremental Search dialog box.

To use the Quick search text box on the toolbar:
  1. Type the text you want to search for and press Enter.

  2. Press Esc to stop the search. This is a quick method of searching for text in the active editor window.

To use the Find, Replace, Find in Files, Replace in Files, and Incremental Search functions:
  1. Before you use the search commands, choose Tools>Options>Editor and make sure the Show bookmarks option is selected.

  2. Choose the appropriate search command from the Edit menu. For more information about each search function, see Edit menu.

  3. To remove the blue flag icons that have appeared in the left-hand margin, right-click in the Find in Files window and choose Clear All from the context menu.