Skip to content

Why isn't the 'Connect to running target' feature implemented in OpenOCD debugging? #631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
laomaolaile opened this issue May 13, 2025 · 9 comments

Comments

@laomaolaile
Copy link

I've noticed that the 'Connect to running target' feature is implemented in J-Link debugging and works very well. Why isn't this feature available in OpenOCD? What considerations led to not implementing this feature in OpenOCD?

If we were to implement this feature in OpenOCD, what key points or challenges should be taken into account?

Image

Image

Looking forward to your response. Thank you very much for your help.

@ilg-ul
Copy link
Contributor

ilg-ul commented May 13, 2025

The 'Connect to running target' feature was implemented in J-Link debugging because by that time I was using J-Link intensively and I knew that this feature was available with J-Link.

I'm not actively using OpenOCD and my experience with it is limited, thus I don't know if this feature is available in OpenOCD.

@ilg-ul
Copy link
Contributor

ilg-ul commented May 13, 2025

For general question please use Discussions, not Issues.

@ilg-ul ilg-ul closed this as completed May 13, 2025
@fanghuaqi
Copy link

For openocd, it can be archived by not send any monitor reset command, and no elf loaded, maybe we can add same feature in openocd debug configuration

@ilg-ul
Copy link
Contributor

ilg-ul commented May 13, 2025

Can't you achieve a similar result by not entering the elf and by not sending the reset command?

@TommyMurphyTM1234
Copy link

TommyMurphyTM1234 commented May 13, 2025

It's a while since I've used it but it definitely used to be possible to achieve "connect to running target" functionality using Embedded CDT and OpenOCD by tweaking the GDB/OpenOCD commands and plugin configuration settings used at debug launch time so that they don't perform any reset, program load, setting the program counter etc. I don't think that any change needs to be made to the plugins themselves - just to the debug launch configuration and possibly the OpenOCD script used. There is no limitation in OpenOCD that precludes/prevents such an approach to debugging.

@laomaolaile
Copy link
Author

I did some testing. As shown in the image, by disabling the corresponding checkbox in the configuration, it is possible to "Connect to running target." I plan to proceed with this modification.

Image

@ilg-ul
Copy link
Contributor

ilg-ul commented May 15, 2025

Great! Good luck with your projects!

@laomaolaile
Copy link
Author

laomaolaile commented May 19, 2025

Hi, @ilg-ul

I’ve implemented support for the "Connect to running target" feature in OpenOCD and opened a corresponding Pull Request. I would greatly appreciate it if you could review it when you have time. 🌹

#638

@fanghuaqi
Copy link

Hi @ilg-ul, maybe we can reopen this issue, since @laomaolaile is contributing to it and want to add the connect ot running target feature to OpenOCD debug configuration in this PR #638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants