Skip to content

Select the version of IAR Embedded Workbench to use with any given workspace

License

Notifications You must be signed in to change notification settings

IARSystems/ewlaunch

Repository files navigation

EWlaunch

EWlaunch lets you select which version of IAR Embedded Workbench to use with any given workspace:

ewlaunch-demo

Once a version is selected, the choice can be stored in a corresponding <workspace>.custom_argvars file. This enables the correct version to be used automatically the next time the workspace is launched.

Installations are automatically located from the Windows Registry. It is also possible to manually specify additional installation directories.

If you end up with a question or suggestion specifically related to the EWlaunch utility, you might be interested in verifying if it was already discussed in earlier issues. If you could not find what you are looking for, feel free to create a new issue. It is possible to receive notifications about updates in your GitHub inbox by starting to watch this repository.

Setup

Download and extract the latest binary release. Check that ewlaunch.exe is among the extracted files, otherwise verify that you downloaded the binary release rather than the source code.

There are two binaries in the EWlaunch installation:

  • ewlaunch_win.exe is typically used through file association and/or the Explorer context menu, as described in the following sections.
  • ewlaunch.exe is a console application, see the section on Command line usage.

Context Menu

To add EWlaunch to the right-click context menu in Windows file explorer:

  1. Edit add_context_menu.reg with the path to ewlaunch_win.exe (the default is c:\ewlaunch\ewlaunch_win.exe).
  2. Run add_context_menu.reg to add the entries to the registry.

File Type Association

To associate the file types .eww and/or .custom_argvars:

  1. Shift + right-click on a file, of the type that you want to be opened by EWlaunch.
  2. Select Open With > Select Program ...
  3. Browse to locate ewlaunch_win.exe.
  4. Select Always use this program.

Usage

Below are some examples of how to perform common tasks using EWlaunch. See also ewlaunch.ini for configuration options.

Open an existing workspace (.eww) file

If file type associations have been configured, simply click on the file to open. Alternatively, open the context menu by right-clicking on the file (or on the containing folder) and select "EWlaunch".

EWlaunch inspects the corresponding .custom_argvars file to discover which version to launch. If it does not find such information, then a selection dialog will be shown. To always show the selection dialog even when the version is known, press the Shift key when right-clicking on the file/folder, and select "EWlaunch (select version)".

Create a new workspace

Right-click on a folder (that does not contain a .eww file) and select "EWlaunch" in the context menu. A new empty workspace is created inside the directory and opened in the selected version.

Launch without workspace

Specify an empty workspace path in the EWLaunch selection dialog to start the selected version without workspace.

Open a shell

Shift + Right-click on the .eww file (or the containing directory) and select "EWlaunch (shell)". This starts a customized cmd.exe shell:

  • Working directory is set to the workspace directory.
  • The bin folders of the toolchain are added to the PATH environment variable.
  • A number of environment variables are added, similar to the argument variables that are available from inside IAR Embedded Workbench.

Command line usage

This section shows some examples of using ewlaunch.exe from the command line.

Example: Listing versions

> ewlaunch command 9.20
Arm 9.20.1
Arm 9.20.2
...

Example: Running a one-liner

> ewlaunch command 9.20.[24] -- iccarm --version
Arm 9.20.2:
IAR ANSI C/C++ Compiler V9.20.2.320/W64 for ARM
Arm 9.20.4:
IAR ANSI C/C++ Compiler V9.20.4.327/W64 for ARM

The environment that the command (iccarm --version in the example above) runs in, is similar to what is described in Open a shell.

Installation files

You can create a file where you manually specify installation directories. This file can then be specified in ewlaunch.ini, or on the command line with --installations <file>. To load installations both from a file, and from registry, specify the option --reg.

Below is an example of an installations file. EW_DIR is the path to the root of the IAR Embedded Workbench installation:

[Arm 7.80.4]
  EW_DIR: C:\IAR Systems\Embedded Workbench ARM 7.80.4

There are additional commands for dealing with installation files:

  • ewlaunch dump creates a file with the installations found in registry.
  • ewlaunch scan scans directory trees for installations.

Version history

  • 2.0 - 2022-05-24 - shell and command function.
  • 1.0 - 2020-11-01 - Initial version