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

Time Permitting
open-accepted
None
5
2014-10-21
2014-07-16
John Moule
No

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.

Discussion

  • 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>
    
     
    • status: open --> open-accepted
    • assigned_to: 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

    Hi,

    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.

     
  • 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

    Hi,
    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