Menu

#187 problem with workspace tool path settings if using headless build of Eclipse

Next release
closed
None
5
2015-08-01
2015-06-02
No
  • Eclipse Luna (actually Kinetis Design Studio v3.0.0)
  • GNU ARM C/C++ Cross compiler plugins (1.13.1.201504061754)

I'm using the launchpad tools with the GNU ARM Eclipse plugins in 'headless mode', and I'm running into an issue that the global toolchain is not properly recognized. Building the project in Eclipse runs fine.

However, if I build it in headless mode, it seems not be able to use the local toolchain (see LateInitializer.added()) below (it reports it cannot find the proper libraries/specs file).

The global tool path settings (Window > Preferences > C/C++ > Build > Global Tool Paths) are:
${eclipse_home}../bin
${eclipse_home}/../toolchain/bin
The same setting on the project level is empty (not path sets).
The problem is that somehow the workspace settings are not taken into account (see below)

Log from the console:
C:\tmp\FTF\F1149>c:\freescale\kds_3.0.0\eclipse\eclipsec.exe -application org.ec
lipse.cdt.managedbuilder.core.headlessbuild -data C:\tmp\FTF\F1149\wsp_kds3.0.0
-build MyProject
DefaultPreferenceInitializer.initializeDefaultPreferences()
Default toolchain.name=GNU Tools for ARM Embedded Processors
LateInitializer.added() org.eclipse.core.runtime.preferences.IEclipsePreferences
$NodeChangeEvent[source=/default] ilg.gnuarmeclipse.managedbuild.cross
DefaultPreferences.discoverBuildToolsPath()="C:\Program Files (x86)\GNU ARM Ecli
pse\Build Tools\bin"
Default buildTools.path=C:\Program Files (x86)\GNU ARM Eclipse\Build Tools\bin
Default toolchain.search.path.1287942917=${user.home}/AppData/Local/Programs/GNU
Tools ARM Embedded;c:/Program Files/GNU Tools ARM Embedded;c:/Program Files (x8
6)/GNU Tools ARM Embedded
Default toolchain.path.1287942917=c:/Program Files (x86)/GNU Tools ARM Embedded/
4.7 2013q2/bin

I found as workaround, that if I specify an absolute path in the project local settings to the build tools, things are working properly.
So I suspect that with using the headless build of Eclipse, the global toolchain and tool paths are resolved too late, causing the build to fail?

I hope this is enough information.

Thanks!
Erich

Discussion

  • Liviu Ionescu (ilg)

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • Liviu Ionescu (ilg)

    I'll investigate, I don't know how the Eclipse preferences mechanism (used for toolchain paths) behaves in headless situations.

     
  • John Moule

    John Moule - 2015-06-02

    Hi Erich, this is a wild stab in the dark but could you try adding "--launcher.ini c:\Freescale\KDS_3.0.0\eclipse\kinetis-design-studio.ini" to your headless launch params. It then behaves more like KDS than Eclipse and may benefit from some toolchain paths being setup.

    This is from Joe's recent post: https://community.freescale.com/thread/356326

    eg:

    c:\Freescale\KDS_3.0.0\eclipse\eclipsec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import C:\Freescale\KSDK_1.2.0\lib\ksdk_freertos_lib\kds\K64F12 -cleanBuild all -data workspace.headless --launcher.ini c:\Freescale\KDS_3.0.0\eclipse\kinetis-design-studio.ini

     
  • Erich Styger

    Erich Styger - 2015-06-03

    Hi John,
    thanks, using the --launcher.ini indeed solved my problem too :-)

    Erich

     
  • John Moule

    John Moule - 2015-06-03

    Great! It was all Joe's work ;-)
    cheers john

     
  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed