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

minichlink debugger instability #246

Open
lzace817 opened this issue Oct 3, 2023 · 5 comments
Open

minichlink debugger instability #246

lzace817 opened this issue Oct 3, 2023 · 5 comments

Comments

@lzace817
Copy link

lzace817 commented Oct 3, 2023

The debugger with minichlink is quite unstable.

But instability is subjective, I would like to provide something concrete about it.

In the wireshark dump bellow at line 00000427 should be:

  • 'OK' for success
  • 'E NN' for an error
0000022E  24 6d 31 31 36 2c 34 23  36 35                     $m116,4# 65

0000041A  2b                                                 +
0000041B  24 37 33 30 30 32 30 33  30 23 38 66               $7300203 0#8f

00000238  2b                                                 +
00000239  24 44 23 34 34                                     $D#44

00000427  2b                                                 +

0000023E  2d                                                 -
0000023F  2d                                                 -
00000240  2d                                                 -
00000241  2b                                                 +

Note: RVHandleDisconnect seems to be the one handling it.

I hope it is usefull.

References

manual page 774

@mrx23dot
Copy link

mrx23dot commented Oct 5, 2023

What's the benefit of minichlink over

openocd -s "D:\Progs\MounRiver\MRS_Community\toolchain\OpenOCD\bin" -f wch-riscv.cfg -c "program build\\obj\\proj.elf verify; reset; " ?

Although verification takes me long 15s

@lzace817
Copy link
Author

lzace817 commented Oct 6, 2023

freedom.

AFAIK wchlink doesn't work with vanilla openocd. Given the modified version of openocd and the FOSS software nature, perhaps it's already supposed to be open, but I'm not a lawyer. But having more control over our tooling it good. If anyone knows better, I would be glad to hear.

@mrx23dot
Copy link

mrx23dot commented Oct 6, 2023

Sounds reasonable, does minichlink verify faster for you? It's awfully long on wchlink, like 10x longer than download.

And is it just a matter of changing USB drives? I don't have to reflash the programmer do I?

@lzace817
Copy link
Author

lzace817 commented Oct 6, 2023

At this moment, minichlink is pretty much unusable for debugging. It's ok for flashing and serial i/o.

About your specific problem, I'm wondering if you can drop the verify, because it may be the source of slowdown.
No reflash needed. On windows I only used the MRS, don't know about drivers.

@mrx23dot
Copy link

mrx23dot commented Oct 6, 2023

Thanks for the info, yeah debugging is essential for me, otherwise it's programming by iteration.

Without verify it's really fast, that's a possible solution.
I just need to sort out the VScode for gdb, got another ticket for that.

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

2 participants