The new feature #19 New processing for toolchain path is great and adds a configurable, and defaultable, workspace settings for the toolchain path when a project does not exist.
The project-less debug* facility should utilise this so that when using Debug Configuration default values for "GDB SEGGER J-Link Debugging > Debugger > GDB Client Setup > Executable field" (and similarly for OpenOCD), namely ${cross_prefix}gdb${cross_suffix}, and without a project being specified, the GDB client will be found on the default toolchain path and a successful launch may be achieved.
I have attached a patch (against 2.6.1-201502281154) which does this. This may not be the best approach, but is a starting point.
Test:
0) Launch Eclipse and make sure the following string substitutions (Preferences > Run/Debug > String Substitutions) are defined:
cross_prefix arm-none-eabi-
cross_suffix
1) In a workspace, containing no projects, create a "GDB SEGGER J-Link Debugging" debug configuration.
2) Populate only the Main > C/C++ Application field with the path to a pre-built binary.
3) Populate "Debugger > J-Link GDB Server Setup > Device name:" with the desired device.
4) Click Debug.
A debug session for the specified pre-built binary is launched.
*: Related:
#48 Support for project-less debugging
thank you, I'll consider it.
I checked your patch, but things are not that simple, the debug plug-ins are also used without my managed build plug-in, so I cannot introduce a hard dependency like you suggest.
one possible solution would be to decouple things by using an extension point, but it is relatively complicated and I'm not sure it is worth the effort (btw, except you, I've never heard someone else using project-less debugging).
if I got it right, what bothers you is the presence of the ${cross_prefix} macros in project-less launchers, and you would like to automatically substitute them using the definitions from the default toolchain.
as I already mentioned, the debug plug-ins are also used without the managed build plug-ins, so the definitions from the default toolchain are not always available.
do you have any other suggestions related to project-less debugging?
Hi Liviu,
Correct.
I can't think of any other way to achieve it without an extension point. Is it possible to postpone this for now as I'm busy on something else?
cheers john
ok, I also have other priorities, so we can postpone this.