Toolchains

You can use the Toolchains function to quickly configure local and remote build of a C/C++ project. The GCC and LLVM build tools are supported.

A project runs remotely or locally based on the toolchain configuration used during build. (For example, if the local toolchain configuration is used during build, the project runs locally by default.)

Local Build Configuration

  1. Choose File > Settings....

    In the navigation tree on the left, choose Tools > Toolchains to enter the page shown in Figure 1.

    Figure 1 Page for configuring the toolchain
  2. Click + to add the Toolchains configuration option.
    • On Linux, configure the toolchain to System, as shown in Figure 2.
    • On Windows, configure the toolchain to MinGW, as shown in Figure 3.
    • For details about how to configure the LLVM toolchain on Linux, see Figure 4. For details about how to configure the LLVM toolchain on Windows, see Figure 5.
      Figure 2 Toolchain System on Linux
      Figure 3 Toolchain MinGW on Windows
      Figure 4 Toolchain LLVM on Linux
      Figure 5 Toolchain LLVM on Windows
      Table 1 Parameters and icons

      Parameter/Icon

      Description

      Name

      Toolchain configuration name.

      Environment

      MinGW path. The value can be automatically identified after the environment variable is configured. You can also manually enter the path or click on the right to configure a path.

      NOTE:

      This option is unavailable in Linux.

      Cmake

      CMake path on the local server. You can manually enter a path or click on the right to configure a path.

      Make

      Make path on the local server. You can manually enter a path or click on the right to configure a path.

      C Compiler

      C Compiler path on the local server. You can manually enter a path or click on the right to configure a path.

      C++ Compiler

      C++ Compiler path on the local server. You can manually enter a path or click on the right to configure a path.

      Debugger

      Debugger path on the local server. You can manually enter a path or click on the right to configure a path.

      Adds a toolchain configuration.

      Deletes a toolchain. Select a toolchain and click this button to delete it.

    After the toolchain takes effect, a piece of information is automatically generated under Tools > Toolchains in the navigation tree on the left for build configuration.

Remote Build Configuration

  1. Choose File > Settings....

    In the navigation tree on the left, choose Tools > Toolchains to enter the page shown in Figure 6.

    Figure 6 Page for configuring the toolchain
  2. Click + to configure the toolchain Remote Host.
    Figure 7 Configuring the toolchain Remote Host
    Table 2 Parameters and icons

    Parameter/Icon

    Description

    Name

    Toolchain configuration name.

    Credentials

    SSH configuration. Click or to select the required SSH connection. If the required SSH connection does not exist, click in the displayed window to configure an SSH connection.

    Cmake

    CMake path on the remote server. The path is automatically identified after Credentials is configured. You can manually enter the path or click on the right to configure the path.

    Make

    Make path on the remote server. The path is automatically identified after Credentials is configured. You can manually enter the path or click on the right to configure the path.

    C Compiler

    C Compiler path on the remote server. The path is automatically identified after Credentials is configured. You can manually enter the path or click on the right to configure the path.

    C++ Compiler

    C Compiler path on the remote server. The path is automatically identified after Credentials is configured. You can manually enter the path or click on the right to configure the path.

    Debugger

    Debugger path on the remote server. The path is automatically identified after Credentials is configured. You can manually enter the path or click on the right to configure the path.

    Adds a toolchain configuration.

    Deletes a toolchain. Select a toolchain and click this button to delete it.

    After the toolchain takes effect, a piece of Deployment information is automatically generated under Tools > Deployment in the navigation tree on the left, as shown in Figure 8.

    Figure 8 Generating the Deployment information