Menu

#46 Change launch configuration defaults

Version 1.x
closed
None
5
2015-01-29
2014-03-14
John Moule
No

Hi Liviu,

I need to alter some of the default values in the GDB SEGGER J-Link Debugging > Startup tab. I see that defaults are defined in:

ilg.gnuarmeclipse.debug.gdbjtag.jlink.ConfigurationAttributes

For example I want to change the default for "Enable SWO." to false. I think its controlled with this:

ilg.gnuarmeclipse.debug.gdbjtag.jlink.ConfigurationAttributes.ENABLE_SWO_DEFAULT

However, without overriding the entire launch configuration dialog mechanism I'm not sure I know a way of changing these defaults. Any ideas?

cheers john

Related

Feature requests: #70

Discussion

  • Liviu Ionescu (ilg)

    currently these defaults are constants in a file, and can not be changed externally.

    any suggestions?

    btw, enabling swo and not using it should not waste resources.

     
  • Liviu Ionescu (ilg)

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

    John Moule - 2014-03-14

    I'm not really sure what to suggest. One needs a file that can be editted (text) to set the desired defaults, but which is read at runtime. What about a preference page, but without displaying the actual page. Then maybe the preferences could be changed by using the trick of setting them in the product's plugin_customization.ini - that's the only thing I can think of.

    btw, enabling swo and not using it should not waste resources.

    It was something asked by the customer so I'm simply investigating whether its possible.

     
  • Liviu Ionescu (ilg)

    I'm not sure it works like this, but if you 'rephrase' the suggestion as a functional patch, that does not affect the current functionality of the plug-in, I can evaluate it.

     
  • Liviu Ionescu (ilg)

    • status: accepted --> pending
     
  • Liviu Ionescu (ilg)

    John, any progress on this?

     
  • John Moule

    John Moule - 2014-06-24

    Hi Liviu,

    No I haven't done any more with it. However, I was discussing it with a colleague the other day and we kicked around the idea of putting the values in a plugin.properties file, a bit like you get when you internationalize string values.

    The idea being a product integrator (my company) could change the values in the plugin.properties without rebuilding the java. There would be a little bit of underlying work to enable us to get at the properties file, but it shouldn't be too hard.

    If you are agreeable to the concept I could create a patch containing the idea?

    cheers john

     
    • Liviu Ionescu (ilg)

      what about

      eclipse/configuration/ilg.gnuarmeclipse.managedbuild.cross/toolchain.properties

      do you think it is a good location for this file?

       
  • Liviu Ionescu (ilg)

    • status: pending --> accepted
     
  • Liviu Ionescu (ilg)

    I think that the mechanism used to parse the preferences.ini can be used for these kind of preferences too.

    now it is a bit too late for the current release, but I'll consider it for a future one.

    another direction would be to use the definitions in the CMSIS packs, when available.

     
  • Liviu Ionescu (ilg)

    yes, the kind of preferences that you can set via preferences.ini (stored in the plug-in folder), or plugin_customization.ini (stored in the product definition).

     
  • John Moule

    John Moule - 2014-10-14

    That would be great if we could control them in the plugin_customization.ini!

     
  • Liviu Ionescu (ilg)

    • status: accepted --> closed
     
  • John Moule

    John Moule - 2015-01-28

    Hi,
    I'm just trying to implement the jlink defaults feature described here:

    http://gnuarmeclipse.livius.net/wiki/Ilg.gnuarmeclipse.debug.gdbjtag.jlink_defaults

    I've set the following values in my plugin_customization.ini file for my product.

    ilg.gnuarmeclipse.debug.gdbjtag.jlink/gdb.server.executable.default=${jlink_path}/${jlink_gdbserver}
    ilg.gnuarmeclipse.debug.gdbjtag.jlink/gdb.client.executable.default=${cross_prefix}gdb${cross_suffix}
    ilg.gnuarmeclipse.debug.gdbjtag.jlink/interface.default=swd
    ilg.gnuarmeclipse.debug.gdbjtag.jlink/enableSemihosting.default=true
    ilg.gnuarmeclipse.debug.gdbjtag.jlink/enableSwo.default=false
    ilg.gnuarmeclipse.debug.gdbjtag.jlink/jlink_path.default=${eclipse_home}../segger
    ilg.gnuarmeclipse.debug.gdbjtag.jlink/jlink_gdbserver.default=JLinkGDBServerCL
    

    jlink_path.default and jlink_gdbserver.default work fine in the String substitions, but things like the enableSwo.default=false don't work when I create a new segger debug config; the option has the normal true value.

    Am I using this correctly?

     
    • Liviu Ionescu (ilg)

      I don't know, did you try this on a fresh workspace? since these values are persistent, you might be using your previous settings.

       
  • John Moule

    John Moule - 2015-01-28

    I can see the code used for gdb.server.executable is in ilg.gnuarmeclipse.debug.gdbjtag.jlink.EclipseDefaults.

    But can't find any for enableSwo.

     
    • Liviu Ionescu (ilg)

      it might be possible that the changes are still in the devel branch, did you check there?

       
  • John Moule

    John Moule - 2015-01-29

    Ah, yes they are. Thanks.
    Perhaps you were awaiting feedback before moving it to stable. I will try it out and get back to you.

    Do you have plans to add openocd equivalents at some point? eg

    ${openocd_path}/${openocd_executable}
    
     
  • Liviu Ionescu (ilg)

    before moving it to stable

    usually the devel branch is merged to stable after official releses.

    openocd equivalents

    if needed, yes.

    FYI, there are major changes in the debug plug-ins, triggered by the requests received from Infineon to improve the J-Link plug-in.

    since most of the changes were applied to the common gdbjtag classes, all debug plug-ins (jlink/openocd/qemu) were able to benefit from the improvements, so also the quality of the openocd plug-in was improved.

    there is also a new custom build of openocd (the GNU ARM Eclipse OpenOCD) available for download from SourceForge (http://gnuarmeclipse.livius.net/blog/openocd/).

    the new plug-ins (+ new build tools, new openocd and new qemu) are expected to be released in about 2-3 weeks.

     
  • John Moule

    John Moule - 2015-01-29

    if needed, yes.

    Yes please. It would then be symmetrical. And I could remove my code that handles the openocd side of things.

    Thanks for the other information; its useful to see your release schedule.

     
  • Liviu Ionescu (ilg)

    I added a new feature request ticket, I'll try to implement it before the next release

     
  • John Moule

    John Moule - 2015-01-29

    Thanks