Adding New Compiler Toolchains to DS-5

In this tutorial, you will learn how to add new compiler toolchains (Arm Compiler 5, Arm Compiler 6 and GCC) to DS-5 and configure them for your project easily.


From Arm DS-5 Development Studio v5.20, you can add new compiler toolchains (Arm Compiler 5, Arm Compiler 6 and GCC) and configure them for your project more easily. Different versions of the same toolchain will keep their flags when you switch between them and projects can be shared between you and your colleagues without re-configuring the path.

Note: If you are installing Arm Compiler 6 alongside DS-5 and you don't have a DS-5 Ultimate Edition license, you will need to set the following environment variable: ARM_TOOL_VARIANT=pro. This can be done using set ARM_TOOL_VARIANT=pro in DS-5 Command Prompt, or as a global environment variable in your OS.

DS-5 Settings

Open up DS-5 and click Window > Preferences followed by DS-5.

Select Toolchains, which will bring up the following dialog:

DS-5 includes three compiler toolchains: Arm Compiler 5, Arm Compiler 6 and GCC. These are listed as "built-in", showing that they're already installed.

Note: DS-5 lists the major version number of the compiler (i.e. Arm Compiler 5). This allows your projects to be portable between DS-5 versions when we update the included compilers. When you add a specific version, such as Arm Compiler 5.04u2, this will show up with the sub version.

Click Add...

If you have already downloaded a compiler toolchain, browse to the location of the toolchain bin directory.

Otherwise you can either:

Select the location of the binary for the toolchain

In this case, I've downloaded and installed GCC 7.3.1.

Click Next > to run autodetection. In most cases, this should provide a full set of information about the toolchain. However, for custom implementations of GCC, you can manually edit these fields.

Successful autodetection of the GCC toolchain in DS-5

Click Finish to complete the process.

You should now see the new toolchain listed alongside the built-in toolchains:

GCC 4.9.1 now appears in the list alongside the other toolchains

You'll be prompted to restart Eclipse for these changes to apply. When you've done this, you will be able to see the new toolchain listed as an option when you start a new project:

New project with option to use GCC 4.9.1 toolchain

Additionally, you can reconfigure existing projects to use the newly added toolchain by right-clicking on the project, selecting Properties > C/C++ Build > Tool Chain Editor and then choosing it in the Current toolchain dropdown:

Reconfigure existing project to use new toolchain

Finally, you'll notice that if you swap between different versions of the same toolchain, DS-5 will now remember your flags and other settings, so there's no need to re-enter them. However, this is not the case when moving between different toolchains (such as Arm Compiler 5 and Arm Compiler 6).

It's also possible to add and/or select new toolchains using the DS-5 Command Prompt. You'll notice that on startup, the Command Prompt now contains a message explaining that no toolchain is set by default, along with the select_toolchain command to begin the process of selecting one.

Command prompt

To add a new toolchain, use the add_toolchain command followed by the path to the folder where the binary is located. For example add_toolchain "C:\Program Files (x86)\Linaro\gcc-linaro-aarch64-linux-gnu-4.9-2014.05\bin". Just like the GUI, you will then have the opportunity to finish the process, or manually edit the details:

Add new toolchain from the command prompt

Entering select_toolchain brings up a numbered list including the new toolchain:

Select a new toolchain from the command prompt