ARM releases updates to DS-5 on an approximate quarterly cadence, and as I write this, we have just released v5.20 of the tool. With each release we increment the debugger and compiler(s) version to the latest version available. This can cause difficulty for the compiler use case, as typically the version of a compiler used for a given project becomes fixed at some point in time, and moving from this version becomes costly from a validation and/or qualification point of view. ARM has always made the ARM Compiler package available as a separate installation for those users that do not wish to use the default version. However, until now, it has been precisely that... a separate installation, detached from the rest of your DS-5. As you've likely guessed from the title of this article, this is a situation that we have improved within DS-5 v5.20.
You will first need to download the appropriate compiler package, and install. I recommend installing to the DS-5 sw directory where the default tools are, though you can use any location. You then need to make DS-5 aware of this installation. To do this, launch the Eclipse GUI, and navigate through the Window menu to Preferences. Therein, drill down the left hand side to select DS-5, and then Toolchains:
Click Add... and navigate to the bin (or bin64) directory of the compiler you wish to add:
Click on Next and the tools will verify the location:
Click on Finish, and you will be asked to restart the GUI. The newly added compiler version will now be available to use in your projects:
For those that build from makefiles or equivalent, these changes are reflected in the DS-5 Command Prompt. Now, when you launch this, you will first see the following:
We have created an add_toolchain script that behaves in a similar manner to the above. Use the path to the bin directory and it should work just as above.
We provide two scripts (select_toolchain and select_default_toolchain) to allow the user to set the appropriate compiler version that they wish to use. As the names suggest, using select_default_toolchain is a do-once operation to set the default compiler version used each time the user launches the command prompt. If necessary, you can then override the compiler version used for a particular compilation session using select_toolchain. The use of either of these options is simple. Call the appropriate script, and you will see a list of available compiler versions. Select the version you wish to use, and the environment will instantly be set to point to that version.