Skip to content

Add connect to running target in OpenCD #638

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

laomaolaile
Copy link

  • Add connect to running target in OpenCD
  • Modify an effect bug of connect to running target in jlink

@fanghuaqi
Copy link

Could you provide some screenshots of how it works? @laomaolaile

@laomaolaile
Copy link
Author

laomaolaile commented May 19, 2025

I have added a "Connect to running target" checkbox on the Debug page, similar to the one in the J-Link debugger UI.

image

When the "Connect to running target" option is selected, it affects the settings of several other options, as shown in the image below.

image

I have tested the implementation, and it works as expected. The GDB trace also confirms that the behavior matches the expectations.

image

@TommyMurphyTM1234
Copy link

What happens if the user checks Connect to running target and then checks one or more of Initial reset, Load executable, Pre-run/Restart reset, Continue? Does Connect to running target get unchecked or is a configuration error displayed?

@laomaolaile laomaolaile force-pushed the personal/zhangzegang/feature_connecttorunningtarget2 branch from 940b534 to aad4715 Compare May 19, 2025 08:33
and modify an effect bug of connect to running target in jlink
@laomaolaile laomaolaile force-pushed the personal/zhangzegang/feature_connecttorunningtarget2 branch from aad4715 to ede128e Compare May 19, 2025 08:37
@laomaolaile
Copy link
Author

When the "Connect to running target" option is checked, the options Initial reset, Load executable, and Pre-run/Restart reset are disabled.

At the same time, when sending GDB commands, the system will first check whether "Connect to running target" is enabled, and then determine whether Initial reset, Load executable, or Pre-run/Restart reset should be used.

The Connect button is not related to the "Connect to running target" option.

@TommyMurphyTM1234
Copy link

TommyMurphyTM1234 commented May 19, 2025

When the "Connect to running target" option is checked, the options Initial reset, Load executable, and Pre-run/Restart reset are disabled.

Thanks - I missed that in the screenshots.

Might it then become confusing if/when the user wants to use one of those options and doesn't understand that they're disabled because the Connect to running target option on another dialog tab is enabled?

The Connect button is not related to the "Connect to running target" option.

I presume you meant the Continue button? My mistake to mention it in this context.

@laomaolaile
Copy link
Author

You're absolutely right — this could indeed be a potential source of confusion. If the "Connect to running target" option were placed on the Startup tab, users would be able to see how Initial reset, Load executable, and Pre-run/Restart reset become grayed out as soon as it's checked, which would make the behavior more intuitive.

However, I followed the J-Link implementation as a reference, where "Connect to running target" is located on the Debugger tab. To maintain consistency in UI style and user habits, I also placed it on the Debugger tab in this implementation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have time now to check the full code, what does this call?

@ilg-ul
Copy link
Contributor

ilg-ul commented May 19, 2025

Please make all pull requests against the develop branch.

@laomaolaile laomaolaile changed the base branch from master to develop May 20, 2025 02:48
@laomaolaile
Copy link
Author

Please make all pull requests against the develop branch.

Sorry, I didn't notice this earlier — I've already made the changes.

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

Successfully merging this pull request may close these issues.

4 participants