## Overview

In this tutorial, we show how to add and configure new compiler toolchains to your Arm Development Studio (Arm DS) project. The toolchains include Arm Compiler 5, Arm Compiler 6, and GCC. The example in this tutorial demonstrates how to add a GCC toolchain for Arm DS. Switching between different versions of the same toolchain keeps toolchain flags on. Therefore, projects can be shared between colleagues without reconfiguring the path.

Note: In the default installation of Arm DS, Arm Compiler 5 and Arm Compiler 6 are included. The GCC compiler must be added separately.

## Arm DS Adding Tool Chain Settings

Arm Development Studio (Arm DS) includes two compiler toolchains, Arm Compiler 5 and Arm Compiler 6. These toolchains are part of the default Arm DS installation. GCC toolchains are not built in with Arm DS. In this tutorial, we add a GCC toolchain for Arm DS.

1. Open Arm Development Studio and select Window.
2. Click Preferences, then in the navigation tree, select Arm DS.
3. Click Toolchains, in the navigation drop down, as you can see in the following screenshot:

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

The following screenshots display these options:

6. Click OK to run autodetection. A full set of information about the toolchain is provided. For custom implementations of GCC, you can manually edit these fields. The following example screenshot uses GCC 7.4.1:

7. Click Finish to complete the process. You can now see the new toolchain listed alongside the built-in toolchains, as seen in the following screenshot:

You will be prompted to restart Arm DS IDE for these changes to apply. When complete, the new toolchain is listed as an option when you start a new project, as shown in this screenshot:

You can reconfigure existing projects to use the new toolchain:

1. Select the project and right-click.
2. Click Properties, then C/C++ Build and then click Tool Chain Editor.
3. Select your toolchain under the Current toolchain drop-down.
4. Clean and build the project again after you change the toolchain.

This is displayed in the following screenshot:

Arm DS remembers your flags and other settings when swapping between different versions of the same toolchain, so there is no need to re-enter them.

Note:Arm DS does not remember your flags and other settings when moving between different toolchains like Arm Compiler 5 and Arm Compiler 6.

## Adding a toolchain from the Command Prompt

It is possible to add and select new toolchains using the Arm DS Command Prompt. On start-up, the following warning message is displayed: No compiler toolchain specified for environment. To specify a toolchain, use the select_default_toolchain command, as shown in the following screenshot:

To add a toolchain, use the add_toolchain command followed by the path to the folder where the binary is located. For example, add_toolchain "Path\to\toolchain\bin". Just like the GUI, you can finish the process, or manually edit the details, as shown in the image:

Entering select_toolchain brings up a numbered list including the new toolchain, see the following image:

You can select the toolchain that you want, and build the project based on the selected toolchain.