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 unitialized WCH-LinkE errors #455

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Fix unitialized WCH-LinkE errors #455

merged 2 commits into from
Nov 29, 2024

Conversation

monte-monte
Copy link
Contributor

If LE read or write command fails check internal state of programmer and chip id to determine if programmer was initialized in this run. If not, send magic command in hope to fix things. Works when you just plugged WCH-LinkE into the USB and running minichlink with command that skips startup.

int i;
for( i = 0; i < transferred; i++ )
struct InternalState *iss = (struct InternalState *)( ( (struct ProgrammerStructBase *)dev )->internal );
if ( !iss->target_chip_id && !iss->statetag )
Copy link
Owner

Choose a reason for hiding this comment

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

statetag doesn't mean anything here.

@cnlohr cnlohr merged commit 8d096b0 into cnlohr:master Nov 29, 2024
78 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.

2 participants