#59 Support getting string substitution macro defaults from an external preference file.

Time Permitting
John Moule

When setting values in the String Substitutions page (Window > Preferences > Run/Debug String Substitution) would it be possible to read initial default values from an external preference file in a similar way to the default toolchain mechanism (http://gnuarmeclipse.livius.net/wiki/Default_toolchain) please?

So for example the ISV could specify the following values in file <eclipse install="">\configuration\ilg.gnuarmeclipse.managedbuild.cross\toolchains.prefs:

default.jlink_gdbserver=<ISV's name="" of="" the="" J-Link="" GDB="" server="" executable="">
default.jlink_path=<ISV's path="" to="" J-Link="" installation="" folder="">
default.openocd_executable=<ISV's name="" of="" the="" OpenOCD="" executable="">
default.openocd_path=<ISV's path="" to="" OpenOCD="" installation="" folder="">

cheers john

Related tracker:
#54 Possibility to set default toolchain path using external properties files.


  • John Moule

    John Moule - 2014-07-16

    My example got mangled. It should read:

    default.jlink_gdbserver=<ISV's name of the J-Link GDB server executable>
    default.jlink_path=<ISV's path to J-Link installation folder>
    default.openocd_executable=<ISV's name of the OpenOCD executable>
    default.openocd_path=<ISV's path to OpenOCD installation folder>
  • Liviu Ionescu (ilg)

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

    I am considering implementing some form of properties/preferences for the J-Link plug-in GUI.

    There two main fields in the Debugger tab that I consider fixing:
    - GDB server executable
    - GDB client executable

    So if you have custom settings for these two fields, a single string for each one would be enough?

    I think this is quite generic, you can use anything you want, you can keep the actual macros or define your own.

    I will check if environment variables are also properly expanded.

    However this does not solve 100% your request, since it does not provide values for the sting substitution macros, but only for the GUI fields.

  • John Moule

    John Moule - 2014-10-20


    thanks for considering this!

    I think you're saying that you can provide me with the facility to change the name of jlink_gdbserver and jlink_path, but not the initial value specified in the String Substitutions dialog. Is that correct or have I misinterpreted?

    What I would like is the facility to change the intial values of the well know jlink_gdbserver and jlink_path variables. I see this is done in ilg.gnuarmeclipse.debug.gdbjtag.jlink.GdbServerVariableInitializer.initialize(IValueVariable). What would be cool is if the intial value is read from a pref file, if it exists.

    As jlink_gdbserver and jlink_path names have been public for a while now I think its a good idea to keep them the same name and not have the facility to change their names. This would break compatibility with older Debug Configurations.

  • Liviu Ionescu (ilg)

    in this case I'll do both, variables with the default content for the entire field, and variables with defaults for jlink_gdbserver and jlink_path.

    however even this mechanism is not this generic enough, since normally the j-link path changes after an SEGGER update (because it includes the version), and you'll still need a manual update of the macro definition.

    so there will be two files, one with the j-link defaults and one with the Run/Debug string macros.

    I'll post details on the wiki as soon as I have a functional implementation.

  • John Moule

    John Moule - 2014-10-21

    great, I look forward to trying out the new functionality.

    W.R.T. SEGGER update, that won't affect our product as we ship SEGGER as part of our product and the location doesn't contain a version.

    cheers john

  • Liviu Ionescu (ilg)

    I guess this was fixed by the latest changes related to preferences and defaults. could you check?

  • John Moule

    John Moule - 2015-03-23

    Yes. Thanks.

  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed