Skip to content
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

Fix/1553 rtt cb not found #1583

Merged
merged 4 commits into from
Aug 5, 2023
Merged

Conversation

tdasika
Copy link
Contributor

@tdasika tdasika commented Jul 10, 2023

pyocd is always searching for control_block_id with 16 bytes length (when the block id is less than 16 bytes, it is padding with ‘\0’)
So, when ‘SEGGER RTT’ is the block id to be found, it is searching for 4 words (16 bytes) with zero padding instead of 10 bytes(’SEGGER RTT’), where some junk characters may be present and resulting in failure ‘Control block not found'

Fixing it by searching for only the length of the control block ID provided while setting up rtt

@tdasika tdasika marked this pull request as ready for review July 10, 2023 06:55
Copy link
Member

@flit flit left a comment

Choose a reason for hiding this comment

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

Just a couple small changes.

If you feel like it, please also add your copyright to the file's header comment.

pyocd/debug/rtt.py Outdated Show resolved Hide resolved
pyocd/debug/rtt.py Outdated Show resolved Hide resolved
@flit
Copy link
Member

flit commented Jul 30, 2023

@tdasika Do you mind if I commit the requested changes to your branch so I can close out this PR? I'd like to make sure this fix is included in the next release. Thanks!

@tdasika
Copy link
Contributor Author

tdasika commented Jul 31, 2023

@tdasika Do you mind if I commit the requested changes to your branch so I can close out this PR? I'd like to make sure this fix is included in the next release. Thanks!

@flit , I have addressed the requested changes.

@flit
Copy link
Member

flit commented Jul 31, 2023

I have addressed the requested changes.

Even better! Thanks 😄

@flit
Copy link
Member

flit commented Jul 31, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@flit flit linked an issue Jul 31, 2023 that may be closed by this pull request
@flit flit merged commit 6dcd439 into pyocd:main Aug 5, 2023
21 checks passed
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.

Control block not found when using rtt with pyocd 0.35.0
2 participants