eclipse-embed-cdt / eclipse-plugins

The Eclipse Embedded CDT plug-ins for Arm & RISC-V C/C++ developers (formerly known as the GNU MCU Eclipse plug-ins). Includes the archive of previous plug-ins versions, as Releases.
http://eclipse-embed-cdt.github.io/
Eclipse Public License 2.0
558 stars 130 forks source link

GDB PyOCD Debugging debug configuration opens very slowly on Windows #349

Closed AndriiLishchynskyi closed 3 years ago

AndriiLishchynskyi commented 5 years ago

Description

When you open PyOCD debug configuration Eclipse hangs for approximately 15 seconds, only after that time debug configuration is available. Opening PyOCD debug configurations is extremely painful when you need to make some fixes few times in a row.

Key notes:

Steps to Reproduce

  1. Create new fresh workspace
  2. Create new Project
    • go to File -> New -> C/C++ Project
    • select C Managed Build and press Next
    • fill in Project name
    • select Project type = Empty Project
    • select Toolchains = Cross GCC
    • Press Next, Next, then Finish
  3. Create new debug configuration
    • go to Run -> Debug Configurations
    • right click the GDB PyOCD Debugging and choose New Configuration. Creation takes up to 15 seconds (for OpenOCD time is < 1 second)
  4. close Debug Configurations window
  5. go to Run -> Debug Configurations and select PyOCD debug configurations. Observe it hangs for ~ 15 seconds

Screen capture: https://drive.google.com/open?id=19quDPapnm-weUgKgK6Nfpx4AqBjn_6nH

Expected behaviour: PyOCD debug configurations opens faster (like OpenOCD does, it takes up to 1 second) Actual behaviour: PyOCD debug configurations opens ~ 15 seconds

Versions


ilg-ul commented 5 years ago

@flit?

ilg-ul commented 5 years ago

I don't know how the PyOCD plug-in works, it might have a problem, or it might wait for PyOCD to return something before displaying the configuration page.

flit commented 4 years ago

Whoops, totally missed the notification for this. Sorry about that!

I'm not sure exactly why opening the plugin would be slower on Windows. It may depend on the connected board(s). Specifically for boards with on-board STLink, it can take noticeable time under Windows to map the STLink USB device to the mounted drive letter and read the board ID (to auto-detect the target type). The delay would be longer for each additional STLink-based board that is connected.

The plugin needs to be changed to asynchronously populate the popup menu with connected boards.

Regarding the TCP accesses, I don't have any idea what that would be. The pyOCD plugin runs pyocd-gdbserver to generate a JSON list of connected boards (similar to pyocd list but in JSON), but that is returned via stdout. It doesn't use the network for anything.

I'll see if I can reproduce this in my system.

ilg-ul commented 4 years ago

No problem, you're only one year late. :-(

ilg-ul commented 3 years ago

@flit, v6.0.0 is out now, if you want to fix any issues, please do so, in mid January I plan to release 6.1.0 and we can include your changes there.

flit commented 3 years ago

I'm working on it! 😄

ilg-ul commented 3 years ago

Great! When ready, please submit a PR.

ilg-ul commented 3 years ago

Chris @flit, all my changes for this new release were pushed, so please be sure you rebase your work on the latest commits and submit your PR against develop.