Menu

#175 OpenOCD plugin malfunctions sometimes when reset button is pressed

Next release
closed
None
5
2015-05-06
2015-03-12
Russ Butler
No

plug-in version: 2.6.1-201502281154
eclipse version: Luna Service Release 2 (4.4.2)
java version: 1.8.0_31
operating system: Windows8.1 64bit
toolchain version: GNU ARM Embedded (launchpad) 4.9 2014q4

Steps to reproduce:
-Start a debugging session using OpenOCD
-Press the reset button repeatedly until it stays greyed out (1 - 50 times usually)

Observe: The reset button becomes greyed out along with the run button. The pause and stop buttons are still colored. When the pause button is pressed it becomes greyed out as well. At this point the debugging session cannot be fixed and needs to be restarted.

I noticed this problems when I installed the latest plugin. I went back and versions 2.5.1-201412191510 and 2.4.2-201411261616 and found that these and older version do not have this problem.

Discussion

  • Liviu Ionescu (ilg)

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

    the first attempt to reproduce it was not successful.

    do you press the button in quick succession, or you wait for the debugger to complete?

     
  • Russ Butler

    Russ Butler - 2015-03-12

    When I was testing the different versions I was pressing reset quickly and did not wait for the debugger. I have seen it occur when I was not pressing it quickly though, it just seems less frequent. Also, the run and pause buttons seem unaffected, since I can press each of those rapidly and have never seen problems (unless the reset button already caused problems).

     
  • Liviu Ionescu (ilg)

    still could not reproduce it on my Mac.

    it might be a Windows specific problem.

    the restart processing code was indeed changed recently, but it was done because the previous one had major problems.

    will further investigate, time permitting.

     
  • Russ Butler

    Russ Butler - 2015-03-12

    Would it be helpful if I ran a logging build or anything? I can reproduce this problems fairly easily. Let me know if there is anything I can do to help.

     
  • Liviu Ionescu (ilg)

    thank you, I'll think of a solution.

     
  • Russ Butler

    Russ Butler - 2015-03-13

    I tested this again tonight and had problems re-creating the problem with OpenOCD. I think I was unintentionally using pyOCD in place of OpenOCD. I initially found this problem when trying to get pyOCD running with the latest version of the OpenOCD plugin. I'll investigate this further and let you know what I find.

     
  • Russ Butler

    Russ Butler - 2015-03-15

    I was able to reproduce this multiple times again today using OpenOCD, so I'm not going crazy :). It is really hit and miss as to how quickly this problems occurs - sometimes it takes 30 resets to happen, sometimes this doesn't even happen after 400+ resets.

    The pyOCD debugger is able to reproduce this far faster (possibly because resets get executed much faster), though there appear to be a couple factors making this harder/easier to reproduce. At least with pyOCD, if the reset "Type:" is left blank and "Pre-run/Restart reset." is checked in the startup tab of the debug configuration, this problem is easily reproduced. Also, if the boot sequence between reset and the 'main' function is short this is easier to reproduce. Unfortunately, there isn't a released version of pyOCD that runs with the latest version of the eclipse OpenOCD plugin, though patches to support this should get merged soon. If you want to try pyOCD to see if you can reproduce this, let me know, and I can give you more specific instructions.

    When reset malfunctioned, I noticed that "arm-none-eabi-gdb" eclipse console printed "Quit (expect signal SIGINT when the program is resumed)" in red. It also printed this same message when the pause button was pressed in this state. This occurs when running GDB from a console if ctrl-c is pressed to halt the target, but the target is already halted. This leads me to believe that Eclipse thinks the target is still running, when really the target has already halted. I also found that typing the run command, 'c', into the "arm-none-eabi-gdb" eclipse console would allow the pause button to successfully halt the device, rather than displaying the error message mentioned above.

     
  • Liviu Ionescu (ilg)

    ok, thank you for investigating, but I think the only useful result is to add a notice in the manual to advice against clicking Restart too quickly. :-(

     
  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed