A new mechanism for managing the toolchain path was implemented.
As for the build tools path, the toolchain path can be set on Eclipse (for all workspaces), on workspace (for all projects) or for each project.
Two new Properties pages were added for this (Global Tools Paths and Workspace Tools Path) and one Properties page (Tools Paths).
The fields related to paths were removed from the Toolchains tab.
In addition, a mechanism to search the latest toolchain was added.
The search paths are the following:
toolchain.search.path.windows.1287942917=${user.home}/AppData/Local/Programs/GNU Tools ARM Embedded;c:/Program Files/GNU Tools ARM Embedded;c:/Program Files (x86)/GNU Tools ARM Embedded
toolchain.search.path.linux.1287942917=${user.home}/local:/usr/local
toolchain.search.path.osx.1287942917=${user.home}/Applications/GNU Tools ARM Embedded:${user.home}/local:/usr/local
toolchain.path.id takes precedence over toolchain.search.path.id. In other words, if toolchain.path is defined, it is used as is. If not, toolchain.search.path is searched in order and the result is used as toolchain.path.
I don't understand what this is. Search using what?
a search path where the plug-in tries to identify "bin/arm-none-eabi-gcc".
if you follow the usual install steps, the toolchain installs each new version in a separate folder (which is a good thing). the new mechanism that I implemented acknowledges that having multiple versions is accepted and offers to provide the location of the latest version.
ok, thanks that's clear.
But I think what I am missing is an exact specification of the precedence of this feature (toolchain.search.path.xxx) over ilg.gnuarmeclipse.managedbuild.cross/toolchain.path.1287942917?
For example on a machine WITHOUT "GNU Tools for ARM Embedded Processors" toolchain installed the global toolchain path is set to the value specified with toolchain.path.1287942917?.
But on a machine WITH "GNU Tools for ARM Embedded Processors" toolchain installed the global toolchain path is set to the "GNU Tools for ARM Embedded Processors" installation location (eg: c:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2014q4/bin)
Is this how you expect it to work? Would it not make more sense for the toolchain.path to take precedence over toolchain.search.path?
cheers john
toolchain.path takes precedence over toolchain.search.path. or at least it should. ;-)
Diff:
Good, that fits with my expectation. But I don't think its working like that at the moment. In my test I define (in plugin_customization.ini) this
ilg.gnuarmeclipse.managedbuild.cross/toolchain.path.1287942917=${eclipse_home}/../toolchain/bin
but I don't define toolchain.search.path.windows anywhere. The behaviour is as I described in my example above, with and without "GNU Tools for ARM Embedded Processors" toolchain installed.
you mean that with toolchain.path.1287942917 defined, if you click Restore Defaults, the value is not correct?
I tried this with the GNU-ARM tools installed. Eclipse starts up with the global toolchain path set to "c:/Program Files (x86)/GNU Tools ARM Embedded/4.9 2014q4/bin".
If I click Restore Defaults nothing happens. If I change the global path to "${eclipse_home}../toolchain/bin" and then click Restore Defaults it goes back to the GNU-ARM path.
If I change either the project or workspace paths to "${eclipse_home}../toolchain/bin" and then click Restore Defaults for those, they go back to blank (and hence use the global setting).
oops! the precedence thing was not correctly implemented. :-(
please try the latest 2.6.2.201503041310 beta from updates-test.
Bit pushed at the moment so won't be able to try it for a bit. But I will get round to it. Thanks.
Great! I confirm Commit 222e1c fixes the precedence problem:
"
toolchain.path.id takes precedence over toolchain.search.path.id**. In other words, if toolchain.path is defined, it is used as is. If not, toolchain.search.path is searched in order and the result is used as toolchain.path.
"
However, another small bug in "Global Tools Paths" I think. With the following values set in plugin_customization.ini:
ilg.gnuarmeclipse.managedbuild.cross/toolchain.name=GNU Tools for ARM Embedded Processors
ilg.gnuarmeclipse.managedbuild.cross/toolchain.path.1287942917=${eclipse_home}/../toolchain/bin
The value of "Preferences > C/C++ > Build > Global Tools Paths > Toolchain folder:" is correctly set to ${eclipse_home}/../toolchain/bin. But if I manually change the value of Toolchain folder and restart Eclipse that value is lost and the "${eclipse_home}/../toolchain/bin" returns.
Is this expected behaviour? I would expect it to be ${eclipse_home}/../toolchain/bin intially, but if the user subsequently changes Toolchain folder I would expect that value to stick.
cheers john
I cannot reproduce this, if I change the value and click OK, the value is written in Eclipse/configuration/.settings/ilg.gnuarmeclipse.managedbuild.cross.prefs and next time is loaded from there, if it exists, otherwise the defaults are loaded.
do you identify this file? is the key toolchain.path.1287942917 there?
I'll look into it and get back to you.