Menu

#104 Deselecting the "Allocate console for OpenOCD" prevents a successful connection to the target

Next release
closed-fixed
None
3
2014-04-28
2014-04-11
No

Hi,

Deselecting the "Allocate console for OpenOCD" selection in the GDB OpenOCD Debugging config, under the "Debugger" tab prevents a successful connection to the target. When deselected the following error is reported:

"Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: The system tried to join a drive to a directory on a joined drive.
localhost:3333: The system tried to join a drive to a directory on a joined drive."

Firstly, why would anyone need to deselect "Allocate console for OpenOCD". If there is no reason for this option to be available then perhaps it should be removed to avoid the danger of anyone inadvertently de-selecting the option (which is very likely as you will understand from my next point).

So to my next point. The clickable field associated to the "Allocate console for OpenOCD" spans an area beyond the text and selection box. So the selection can be inadvertently deselected quite easily, when someone clicks on the white in between the "Allocate console for OpenOCD" and "Allocate console for the telnet connection" selections.

Initially we considered this a small issue, however a surprising number of users have fallen into the trap of deselcting "Allocate console for OpenOCD" and finding they can't connect to their target.

Thanks in advance for your help,

Cheers

Stephen

Discussion

  • Liviu Ionescu (ilg)

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

    Hi Stephen, thank you for your bug report.

    It looks like a problem that was already fixed. Anyway, I'm preparing for a new release, with several changes, and with it I can not reproduce this problem.

    Could you install the beta version from updates-test and check if the problem was solved?

    The clickable field associated to the "Allocate console for OpenOCD" spans an area beyond the text and selection box.

    This behaviour is usual for GUIs, and there is nothing that can be done in the plug-in to prevent it.

     

    Last edit: Liviu Ionescu (ilg) 2014-04-12
  • John Moule

    John Moule - 2014-04-14

    Hi Liviu,

    I just tried to reproduce this issue with the latest release and unfortunately it still exhibits the behaviour.

    I'm using:

    ilg.gnuarmeclipse.debug.gdbjtag.jlink (1.5.1.201404120702) "GNU ARM J-Link Debugging Support"
    ilg.gnuarmeclipse.debug.gdbjtag.openocd (1.2.1.201404120702) "GNU ARM OpenOCD Debugging Support"
    ilg.gnuarmeclipse.managedbuild.cross (1.9.1.201404120702) "GNU ARM C/C++ Cross Compiler Support"
    ilg.gnuarmeclipse.templates.cortexm (1.1.1.201404120702) "GNU ARM C/C++ Generic Cortex-M Project Template"
    ilg.gnuarmeclipse.templates.freescale (2.1.1.201404120702) "GNU ARM C/C++ Freescale Kinetis Project Templates"
    ilg.gnuarmeclipse.templates.stm (2.1.1.201404120702) "GNU ARM C/C++ STM32Fx Project Templates"

    To reproduce:
    Create a "GDB OpenOCD Debugging" launch config. In Debugger uncheck "Allocate console for OpenOCD" and click Debug.
    The launch progress sticks on 90% for 10 seconds and then timeouts with the error reported above by Stephen.

    Here is the GDB log for the launch

    399,817 2-environment-cd C:/Users/John/workspace709/blinky
    399,821 2^done
    399,821 (gdb)
    399,821 3-gdb-set breakpoint pending on
    399,831 3^done
    399,831 (gdb)
    399,831 4-enable-pretty-printing
    399,841 4^done
    399,841 (gdb)
    399,841 5-gdb-set python print-stack none
    399,851 5^done
    399,851 (gdb)
    399,851 6-gdb-set print object on
    399,861 6^done
    399,861 (gdb)
    399,861 7-gdb-set print sevenbit-strings on
    399,871 7^done
    399,871 (gdb)
    399,871 8-gdb-set charset ISO-8859-1
    399,881 8^done
    399,881 (gdb)
    399,881 9set mem inaccessible-by-default off
    399,881 10source .gdbinit
    399,883 11-list-thread-groups
    399,891 &"set mem inaccessible-by-default off\n"
    399,891 =cmd-param-changed,param="mem inaccessible-by-default",value="off"
    399,891 9^done
    399,891 (gdb)
    399,891 &"source .gdbinit\n"
    399,891 12-gdb-set auto-solib-add on
    399,891 &".gdbinit: No such file or directory.\n"
    399,892 10^error,msg=".gdbinit: No such file or directory."
    399,892 (gdb)
    399,892 11^done,groups=[{id="i1",type="process"}]
    399,892 (gdb)
    399,892 12^done
    399,892 (gdb)
    399,893 13-target-select remote localhost:3333

    413,998 13^error,msg="localhost:3333: The system tried to join a drive to a directory on a joined dr\ ive."
    413,998 (gdb)
    413,999 &"\n"
    413,999 ^done
    413,999 (gdb)
    414,000 14-gdb-exit
    414,008 14^exit

    rgds john

     
  • Liviu Ionescu (ilg)

    unfortunately I could not reproduce the problem on my OS X machine. I'll try on Windows, maybe it is platform specific.

    in the mean time, to exclude local problems, could you retry your tests on a fresh workspace? just create a new workspace, create a new project using, for example, the cortex-m template, build it, create a new openocd debug configuration, try to start it and check if the behaviour is the same.

     
  • John Moule

    John Moule - 2014-04-14

    Hi,

    I followed your advice and started in a fresh workspace and created a new project (I used the "Freescale Kinetis KLxx C/C++ Project" template). I was still able to reproduce the problem.
    However, I then added a value in Debugger > Log file: to see if the log file would give me any hints. When I clicked Debug the debug session successfully started and stopped on main.

    Perhaps openocd doesn't like not having a console to output to and giving it a log file fixes that?

    Incidentally, would it be possible for you to say what version and where you get your openocd from please?

    cheers john

     
  • Liviu Ionescu (ilg)

    Further test confirmed your find, it seems that the windows version of openocd is not happy without a console. on os x and gnu/linux there are no such problems.

    my windows openocd is 0.7.0, compiled by Freddy Chopin, and was installed using the procedure documented on the site.

    the easy solution to this problem, on windows, is to disable the Allocate console button, and leave it always active.

     
  • John Moule

    John Moule - 2014-04-15

    Hi,
    thanks for the openocd info.
    Are you thinking of releasing a fix for the solution you mention?

     
    • Liviu Ionescu (ilg)

      yes, hopefully these days.

       
  • Liviu Ionescu (ilg)

    I patched the code to keep the button grey on windows.

    please check the version on updates-test and let me know it it works for you.

     
  • Liviu Ionescu (ilg)

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

    fixed in 2.2.2-201404240550