• DS-5新加交叉编译工具


    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.

    Introduction

    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:

      • Go to ds.arm.com and download the Arm Compiler 6 toolchain.

    Or

    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)Linarogcc-linaro-aarch64-linux-gnu-4.9-2014.05in". 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

  • 相关阅读:
    禁止input输入框输入指定内容
    js鼠标按键事件和键盘按键事件用法实例汇总
    JSONP实现跨域
    DedeCMS学习
    原生JS实现瀑布流
    常见浏览器兼容问题、盒模型2种模式以及css hack知识讲解
    Ajax学习整理
    Python学习【第三篇】Python变量
    Python学习【第二篇】Python入门
    Python学习【第一篇】Python简介
  • 原文地址:https://www.cnblogs.com/FZLGYZ/p/11649034.html
Copyright © 2020-2023  润新知