Skip to main content

IAR Embedded Workbench for RISC-V 3.40

Introduction to the IAR Embedded Workbench IDE

In this section:

Briefly about the IDE and the build toolchain

The IDE is the environment where all tools needed to build your application—the build toolchain—are integrated: a C/C++ compiler, C/C++ libraries, an assembler, a linker, library tools, an editor, a project manager with Make utility, and the IAR C-SPY® Debugger. The tools used specifically for building your source code are referred to as the build tools.

The toolchain that comes with your product package supports a specific microcontroller. However, the IDE can simultaneously contain multiple toolchains for various microcontrollers. This means that if you have IAR Embedded Workbench installed for several microcontrollers, you can choose which microcontroller to develop for.

Note

The compiler, assembler, and linker and library tools can also be run from a command line environment, if you want to use them as external tools in an already established project environment.

Tools for analyzing and checking your application

IAR Embedded Workbench comes with various types of support for analyzing and finding errors in your application, such as:

  • Compiler and linker errors, warnings, and remarks

    All diagnostic messages are issued as complete, self-explanatory messages. Errors reveal syntax or semantic errors, warnings indicate potential problems, and remarks (default off) indicate deviations from the standard. Double-click a message and the corresponding source code construction is highlighted in the editor window. For more information, see the IAR C/C++ Development documentation.

  • Stack usage analysis during linking

    Under the right circumstances, the linker can accurately calculate the maximum stack usage for each call tree, such as cstartup, interrupt functions, RTOS tasks, etc. For more information, see Stack usage analysis..

  • C-STAT for static analysis

    C-STAT is a static analysis tool that tries to find deviations from specific sets of rules, where each rule specifies an unsafe source construct. The rules come from various institutes, like MISRA (MISRA C:2004, MISRA C++:2008, MISRA C:2012, and MISRA C:2023), CWE, and CERT. For information about how to use C-STAT and the rules, see the C-STAT® Static Analysis Guide.

  • C-SPY debugging features such as, Profiling, Code Coverage, Trace, and Power debugging. For more information, see the C-SPY Debugging documentation.

An extensible and modular environment

Although the IDE provides all the features required for your project, you can also integrate other tools. For example, you can:

  • Use the Custom Build mechanism to add other tools to the toolchain, see Extending the toolchain.

  • Add IAR Visual State to the toolchain, which means that you can add state machine diagrams directly to your project in the IDE.

  • Use the Subversion version control system to keep track of different versions of your source code. The IDE can attach to files in a Subversion working copy.

  • Add an external analyzer, for example a lint tool, of your choice to be used on whole projects, groups of files, or an individual file of your project. Typically, you might want to perform a static code analysis on your source code, using the same settings and set of source code files as when you compile. See Getting started using external analyzers.

  • Add external tools to the Tools menu, for convenient access from within the IDE. For this reason, the menu might look different depending on which tools you have preconfigured to appear as menu commands.

  • Configure custom argument variables, which typically can be useful if you install a third-party product and want to specify its include directory. Custom argument variables can also be used for simplifying references to files that you want to be part of your project.

The layout of the windows on the screen

In the IDE, each window that you open has a default location, which depends on other currently open windows. You can position the windows and arrange a layout according to your preferences. Each window can be either docked or floating.

You can dock each window at specific places, and organize them in tab groups. If you rearrange the size of one docked window, the sizes of any other docked windows are adjusted accordingly. You can also make a window floating, which means it is always on top of other windows. The location and size of a floating window does not affect other currently open windows. You can move a floating window to any place on your screen, including outside of the IAR Embedded Workbench IDE main window.

Each time you open a previously saved workspace, the same windows are open, and they have the same sizes and positions.

For every project that is executed in the C-SPY environment, a separate layout is saved. In addition to the information saved for the workspace, information about all open debugger-specific windows is also saved.

Note

The editor window is always docked. When you open the editor window, its placement is decided automatically depending on other currently open windows. For more information about how to work with the editor window, see Introduction to the IAR Embedded Workbench editor.