IAR Eclipse Setup Guide Part 1 — Tools Setup

A PDF version of this guide, including project setup and debugging is available in the Documentation section.

This guide is aimed at IAR Embedded Workbench users who are interested in integrating the IAR tools within Eclipse. For instructions relating to integrating GCC within Eclipse see this guide.

Few embedded software developers haven’t heard of IAR Embedded Workbench. IAR EW includes a complete embedded development toolchain (compile, assembler and linker) as well as a dedicated debugger for embedded platforms named C-SPY. On top of that, additional analysis and visualization are available with C-Stat and C-Run. All of that is integrated into a proprietary IDE. Additionally, for developers used to Eclipse, IAR maintains an Eclipse integration with full-featured build and debug support for ARM architectures and build only support for many other architectures.

Perhaps surprisingly, it is one of the best Eclipse integration around. In this new series of guides, we’ll look at how to setup and use the IAR Eclipse plugin. The current article will focus on tools installations and configurations. Future articles will go over managed build and Makefile projects as well as debugging.

About IAR Embedded Workbench

IAR Embedded Workbench is a complete set of compiler toolchain, debugger and IDE for embedded software development targeting multiple CPU architectures and device manufacturers. Additional information about IAR Embedded Workbench can be found on the IAR website.

About Eclipse

Eclipse is a cross-platform IDE that supports multiple programming languages. This document will mainly use the Eclipse CDT environment for C and C++. Additional information about the Eclipse IDE can be found on the Eclipse.org website.

Tools Setup Guide

This section will go over the Eclipse IDE and the IAR toolchain setup. The following instructions will go through the installation and configuration of the following components in order:

  • Eclipse – 2020.12 – eclipse-inst-jre-win64.exe
    www.eclipse.org
  • IAR Embedded Workbench for ARM – 8.50.9 – EWARM-CD-8509-33462.exe
    www.iar.org
  • MSYS2 (Optional) – 20200903 – msys2-x86_64-20200903.exe
    www.msys2.org

The versions cited above are those that were used when writing this guide. Installation instructions for newer versions, if available, should be similar.

Note About the Java Runtime Environment

Eclipse is now packaged with a suitable JRE. However using the JRE over a JDK may cause some dependency issue when installing the IAR Eclipse Plugin. This guide will use JDK version 14. To ensure that the JDK is used it must be installed prior to installing Eclipse and must be selected on the Eclipse install dialog as shown in the guide.

Note About MSYS2 and Makefile Projects

The following guide includes instructions on how to install MSYS2. This is optional to use the IAR Embedded Workbench within Eclipse and is only useful when creating Makefile projects which require GNU Make to be available. Readers who are not interested in creating Makefile projects using IAR do not need to install MSYS2 for the purpose of this guide.

IAR Embedded Workbench Installation

The first package to install is the IAR Embedded Workbench for ARM. Running the IAR installer, EWARM-CD-8509-33462.exe in this example, the following dialog should appear.

First screen of the IAR installer with selection of tools and documentation.
IAR installer spash screen

On the installer menu select “Install IAR Embedded Workbench for ARM”. This will start the IAR EWARM installation wizard proper.

Welcome screen of the IAR installation wizard.
IAR EWARM installation welcome dialog

Click “Next” to display the license agreement.

License agreement panel with a copy of the license text and a set of checkboxes to accept or reject the agreement.
License agreement

Accept the license agreement and click “Next” again to move to the installation path selection screen.

Installation path dialog showing the currently selected installation path with option to select another path if desired.
Installation path selection

The wizard will install the IDE within the usual “Program Files” directory. If, however, you intend to use the IAR toolchain with custom Makefiles it is recommended to install IAR within a different directory with a short path containing no spaces or special characters. In this example, C:/iar_arm will be used as the installation directory.

Click “Next” to continue the installation wizard and display the drivers installation selection screen.

Checkbox list of debug probe driver to install.
Debug probe and dongle driver selection

By default all the debug probe drivers will be selected. Drivers that aren’t needed can be removed from the selection if desired. Click “Next” to continue.

Start menu shortcut folder and name selection dialog with default value displayed.
Windows start menu item dialog

Change the start menu entry if desired and click “Next” again.

Popup modal warning dialog.
Dongle driver USB warning

If the dongle driver was selected in the driver selection screen, a warning dialog will be displayed instructing the user to remove any IAR dongles present on the host machine before proceeding. Click “OK” to dismiss the warning.

Final screen of the wizard prior to starting the installation process.
EWARM installation ready

Click “Install to begin the installation process which may take a few minutes.

Installation progress dialog with completion progress bar.
EWARM installation underway

The installation will proceed and once finished the installation completed screen should appear.

Installation complete dialog with checkbox option to open the release notes.
EWARM installation completed

On the installation completed screen, you have the option to view the release note which will open in the default web browser. Otherwise click “Finish” to end the installation.

From the created start menu entry, launch the IAR Embedded Workbench that was just installed.

Momentary splash screen displayed while IAR is loading.
IAR Embedded Workbench for ARM splash screen

A splash screen will be displayed briefly while the IDE loads, then the IDE should appear.

Empty IAR Embedded Workbench IDE.
EWARM IDE

If there is no valid license installed on the host computer, the IAR License Manager will start automatically. From there you can either install an available purchased license or request a code size limited or time-limited evaluation license.

IAR license manager tool with menu item to request an evaluation license displayed.
IAR License Managed

Follow the instructions on screen to install the selected license type.

Once done with the IAR installation and license setup close the IAR IDE for the moment to proceed with the Eclipse installation.

Eclipse Installation

The next package to install is the Eclipse IDE. Begin by executing the installer file. Note that if possible the 64-bit version of Eclipse is strongly recommended. In this example eclipse-inst-jre-win64.exe, the following screen should appear.

First screen of the Eclipse IDE installer with a list selection of editions available to install.
Eclipse installation welcome screen

Select “Eclipse IDE for C/C++ Developers” by clicking it. Note that it’s also possible to use the “Eclipse IDE for Embedded C/C++ Developers” but the extra features provided by the embedded developers edition aren’t useful when using the IAR Eclipse plugin.

The installation path and JVM selection dialog should appear.

JVM and install path selection dialog with folder selection to pick the install directory and which JRE or JDK to use. Additional checkboxes are used to instructe the installer to create a start menu entry and a desktop shortcut.
Installation path and JVM selection

In the first selection box, the Java Virtual Machine to be used by Eclipse must be selected. By default the installer will automatically select a suitable JRE or JDK if one is found on the host machine. Otherwise the bundled JRE will be used. As mentioned earlier in this guide, JDK version 14 or later is recommended to prevent dependency issues when installing the IAR plugin. This guide uses JDK 14.0.2.

For the installation directory, it is recommended to use a unique directory that is short with no spaces in the name as the eclipse install directory. In this example we will use C:/eclipse_iar as the install directory. The eclipse installer will automatically create an eclipse subdirectory inside the specified installation path. Finally, it is possible to create a start menu entry and/or a desktop shortcut if desired.

Click the “Install” button to begin the installation process.

Progress dialog with progress bar and button to cancel the installation.
Installation progress dialog

By default the installer will download Eclipse during the installation process which may take longer on slow internet connections. An offline installer is available from eclipse.org if necessary.

The installation should eventually finish.

Installation completed dialog with button to launch the installed Eclipse IDE. Other buttons are available to display the readme file or to open the installation directory.
Installation successful

Click “Launch” to check that the Eclipse installation works properly. The workspace selection dialog should appear.

Workspace selection prompt with text box and browse button to select the workspace to create or open. Optional checkbox is displayed to set the selected directory as the default.
Workspace selection dialog

It is strongly recommended to create a unique workspace that will be used exclusively for the projects related to the IAR toolchain that will be installed in this guide. The workspace selected should not have a path name that is excessively long and it is recommended not to use spaces in the path name either. For the purpose of this guide C:/eclipse_iar_workspace will be used as the workspace.

Click “Launch”.

Eclipse momentary splash screen with progress bar while the IDE is loading.
Eclipse splash screen

After a few seconds, the Eclipse welcome screen should appear.

Eclipse IDE with welcome screen showing a selection of documents and tutorials.
Eclipse welcome screen

IAR Embedded Workbench for Eclipse Installation

After having installed Eclipse and the IAR Embedded Workbench it is now time to install the IAR Eclipse plugin manager and register the IAR ARM toolchain installed previously.

Launch Eclipse if it’s not already started. The workspace selection dialog should appear.

Workspace selection prompt with text box and browse button to select the workspace to create or open. Optional checkbox is displayed to set the selected directory as the default.
Eclipse workspace selection dialog

If one wasn’t created earlier, you must select a directory for the Eclipse workspace. It is strongly recommended to create a unique workspace that will be used exclusively for the projects related to the IAR toolchain that will be installed in this guide. The workspace selected should not have a path name that is excessively long and it is recommended not to use spaces in the path name either. For the purpose of this guide C:/eclipse_iar_workspace will be used as the workspace. Click “Launch” to open the Eclipse IDE with the selected workspace.

First things first, find the well hidden “Install New Software” from the Help menu.

Screenshot of Eclipse with the "Install New Software" menu item available from the Help menu highlighted.
Install New Software menu item

Clicking it will open the Eclipse update site manager.

Eclipse software site and installation manager panel.
Install New Software dialog

Type http://eclipse-update.iar.com/plugin-manager/1.0 in the “Work with:” field and press enter. The screen should update to show the available software from the IAR update site.

Install new software panel with IAR Plugin Manager selected for installation.
Install New Software selection

Expand the “IAR Systems” line item and click the checkbox next to “IAR Plugin Manager”. Then click “Next” to be taken to the installation summary screen.

Installation summary screen with IAR Plugin Manager displayed.
Installation summary screen

Click “Next” again to be taken to a license agreement screen.

Licence agreement screen with checkboxes to accept or refuse the agreement.
Plugin license agreement

Make sure to accept the license and click “Finish”. The installation will proceed with the progress displayed in the right bottom corner of the IDE. Do not close Eclipse until the installation completes.

Plugin security warning modal dialog with option to cancel the installation or install anyway.
Plugin installation security warning

It’s possible that a warning dialog appears warning against installing unsigned content. Click “Install anyway” to progress with the plugin installation.

Popup modal dialog asking to restart Eclipse.
Restart prompt after plugin installation

Eventually, when the installation has completed, a dialog prompt will ask to restart Eclipse to enable the newly installed plugin. Do so by clicking “Restart Now”.

IAR plugin manager menu item

After the IDE restarted, there will be a new menu item under the “Help” menu named “IAR Embedded Workbench plugin manager”. Click it to open the manager.

Progress dialog of the IAR plugin manager with progress bar.
IAR plugin manager loading

Loading the manager for the first time might take a few seconds as it queries the updated plugin online.

IAR Eclipse plugin manager with selection of target IAR version and selection of installed IAR embedded workbench.
IAR plugin manager

Once fully loaded the manager will display all the different versions and targets supported by the IAR Eclipse plugin. Clicking on “ARM (8.30-8.50)” should display the toolchain installed earlier in this guide.

Select the installed toolchain, here in this example it is version 8.50.9 installed in the iar_arm directory. Note that any other existing installation will also be displayed as shown in the example there was an existing installation of IAR 8.50.1 in the program files directory. If it is the case that more than one toolchain is displayed make sure you select the one you want to use within Eclipse. After selecting the toolchain click “Install”.

IAR plugin components selection dialog with list of components available to install.
IAR plugin manager install selection

In the Install screen make sure to select all the available components to install. While it may be possible to remove one of the components if it’s not needed, this can cause issues later. Click “Next” to proceed.

Summary of IAR plugin components to be installed.
IAR plugin manager install summary

On the installation summary screen click “Next” again to be taken to another license agreement screen.

License agreement screen for the components to be installed with checkboxes to accept or refuse the agreement.
IAR plugin manager license agreement

Make sure to accept the various licenses and click “Finish”. The installation will proceed, again the progress is displayed in the lower right corner of the IDE. Once finished another prompt to restart Eclipse will appear.

Modal dialog asking to restart the IDE to enable the installed software.
IAR plugin manager restart prompt

Click “Restart Now” to restart Eclipse. If all went well, the IAR toolchain is now usable within Eclipse.

IAR Eclipse welcome screen with selection of documents and tutorials.
IAR Eclipse welcome screen

MSYS2 Installation

MSYS2 is used to provide the GNU Make utility and is not necessary to use the IAR Eclipse Plugin but can be useful when writing Makefile projects. There are multiple options when it comes to installing a basic UNIX environment in Windows, including the well-known Cygwin. This guide will use MSYS2 since it offers superior build performance and good compatibility with native Windows paths. If compatible with the host system, the 64-bit version of MSYS2 is recommended, which is labelled x86_64.

The installation can be started by executing the executable installation file, in this example msys2-x86_64-20180531.exe, the following screen should appear:

First screen and welcome prompt  of the MSYS2 installation wizard.
MSYS2 installation welcome prompt

Click Next.

Installation directory selection box with button to browse for an installation directory.
MSYS2 installation directory prompt

Enter the desired installation directory, the installation directory should be short with no spaces in the path. This guide will assume that the default installation directory of C:/msys64 is used. Click Next.

Start menu shortcut dialog.
MSYS2 installation start menu shortcut prompt

The installer will now prompt for the name of the start menu shortcut. It is recommended to use the default name. Click Next.

Installer progress screen with progress bar and button to see additional details about the files being installed.
MSYS2 installation progress screen

Installation should begin.

Installation complete screen with checkbox to run MSYS2 now when exiting the installation wizard.
MSYS2 installation finished screen

The installation should finish successfully. Make sure that “Run MSYS2 64 bit now.” is checked.

MSYS Bash console.
MSYS2 console

The MSYS2 console should open. It is now necessary to perform an update of the MSYS package manager by typing:


pacman -Syu


And press enter.

Update prompt of the MSYS package manager asking to proceed with the installation of updated packages.
MSYS2 package manager update prompt

After downloading the update information, a prompt will appear to ask for permission to proceed with the installation. Type Y and press enter to continue.

Download and installation will proceed, this can take several minutes depending on network connection and computer performance.

Request for the update process to restart MSYS2 by closing the console and restarting.
MSYS2 package update restart request

It is likely that a warning message is displayed at this point asking to return to the shell and restart the update process. When this occurs exit the MSYS2 console by pressing the X button on the top right corner of the window. It is important to quit the console that way otherwise the warning may reappear in the next invocation.

Modal popup dialog asking to confirm closing of the running terminal session.
MSYS2 window close confirmation

A warning message will be displayed, press OK to proceed with the close.

Open the MSYS2 console again by navigating to the start menu item for MSYS2 and clicking MSYS2 MSYS.

MSYS 2 start menu folder with "MSYS2 MSYS" item highlighted.
MSYS2 start menu entry

Once opened type:


pacman -Su


And press enter to continue the update process.

MSYS2 update prompt asking to proceed with the installation of updated components.
MSYS2 package manager update prompt

A prompt asking for permission to continue will appear again. Type Y and press enter to continue.

Download and installation will proceed, like the previous step this can take several minutes depending on network and computer performance.

Installation should complete without any error or warning messages.

Update completed terminal output.
MSYS2 package manager update done

With the package manager updated and synced it is time to install the basic development utilities. This can be achieved by typing:


pacman -S base-devel


A list of packages to be installed will appear.

Prompt to select which component to install from the "base-devel" group with default option to install all of them.
MSYS2 base-devel prompt

Press Enter to continue.

Confirmation prompt asking to continue with the installation of the new packages.
MSYS2 base-devel installation confirmation prompt

Type Y and then Enter to continue.

Download and installation will proceed, this can take several minutes depending on network and computer performance.

Package installation completed terminal output.
MSYS2 base-devel installation completed

The installation should complete without any error or warning messages.

To test that the installation is functional, let’s run a simple test by invoking the make utility as such:


make -v


The make utility should output its version information in the console.

Version information output from the make command.
MSYS2 make test output

Environment Variable Setup

For the MSYS2 executables to be easily accessible by Eclipse, Make and other utilities it is preferable to have the toolchain binary location in the PATH environment variable. Note that these steps are not required if MSYS wasn’t installed.

Start by opening the Windows Control Panel.

Windows 10 control panel set to small icons.
Windows Control Panel

Click “System”.

System settings screen with Advanced System Setting option highlighted.
Windows system settings

Click “Advanced System Settings”.

System properties with advanced settings pane open.
Windows Advanced System Settings

Click “Environment Variables”.

Environment variables configuration panel.
Windows environment variable configuration panel

In this screen, if an existing PATH environment variable exists, click it and then click “Edit…” otherwise click “New…”

New environment variable dialog. With text boxes to specify the name and the value of the new variable.
Windows new environment variable dialog

The path should be added either to the existing PATH variable or a new one. The usr/bin subdirectory of the MSYS2 installation should be used. For the install directory chosen for this example, this results in the following path:


C:/msys64/usr/bin;


Then click OK.

Environment variables panel with newly created PATH variable displayed.
Configured environment variables

Then OK again to exit the Environment Variables window.

At this point all is ready to go to use the IAR Embedded Workbench within the Eclipse IDE. The next articles will focus on managed build and Makefile projects as well as debugging configuration.

Click here to read the next article in this series about creating a managed build project using the tools installed in this article.

Visit the Documentation section for a PDF version of this guide including project and debugging setup.


See all articles