Replies: 1 comment 2 replies
-
as far as I can remember, these chips don’t support memory readout while they’re running: in other words, the only way RTT can “work” is for the debugger to constantly halt the chip. But yeah, TLDR is that RTT cant work. Which is a real shame. The RISC-V debug spec does support memory readout, but it’s optional. wch pls fix |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm developing a project and I would like to setup it "in a solid way".
I had wrote a library, and I'm writing the ch32 implementation (mainly for ch32v307 and ch32v305).
Inside the library for debugging purpose I used the defmt-or-log crate in order to debug with log with native tests, and with defmt (or nothing) while on a microcontroller.
Obviously I also needed to provide an rtt channel in order to communicate (used rtt-target), and while I upload the code with probe-rs I can see the output from the defmt macros. Also on vscode I can launch the debugger, stop and resume execution, inspect variables ecc.
This is a HUGE step forward from the sdi-print based debugging, but there is a small problem.
I have a very light task that gets awakened at around 40KHz, but when I upload the code with probe-rs (even if I did not print anything with defmt), it gets called almost half the times! But if i restart the program without probe-rs attached it works as intended, but when I attach it with probe-rs attach it starts immediately dropping events.
From what I read online the wlink probe should be fast enough, and in theory jtag shouldn't mess with the microcontroller too-much (it is the whole point right?).
So, I've seen that in the config.toml of the example there are commented lines for run the code with probe-rs so I suppose that someone tried before.
Am I doing something wrong? It's a bug in how probe-rs interacts with the probe (maybe too many polls each second)? Simply the probe is not intended to be used in time sensitive application (given that I don't think 40kHz is that much for a 144Mhz processor, and if there is no active communication I think the probe should read a couple of bytes at 10Hz).
Let me know what you think
Beta Was this translation helpful? Give feedback.
All reactions