Closed sourcebox closed 2 years ago
Hello @sourcebox 👋🏾
You can use https://crates.io/crates/defmt-itm to log your defmt-messages over itm. If you used the app-template to get started, just replace defmt_rtt
with defmt_itm
(link):
use defmt_rtt as _; // global logger
Does this help you?
I think, I don't want to use defmt in my project. It's a great thing, but it doesn't give me any advantage because I have to use core::fmt::Write
in my code anyway. So it would just add complexity without reducing code size.
I see. What is your usecase for Acutally it does make sense. Sorry for the confusion.probe-run
then?
As far as I understand probe-run
it can be used as simpler alternative to openocd
.
As far as I understand
probe-run
it can be used as simpler alternative toopenocd
.
Yes. But it currently only supports rtt. Do you use itm via your probe?
Yes, I'm using an ST-Link via OpenOCD/GDB, then VS Code to dump the ITM messages.
In this setup itm, would be an option, but rtt is also. Why do you choose itm over rtt?
Isn't a J-Link required for RTT?
TIL. That's the problem if you only work with j-links 😅
I have access to a J-Link, but as my projects are usually passed to colleagues and customers, this requirement is often not fulfilled.
I see. I will investigate internally and come back to you 😁
@sourcebox Although rtt was developed by segger, it should still work with other probes, including the st-links.
Can you please try if rtt + st-link works, and report if there is an error? For a minimal example refer to github.com/knurling-rs/app-template.
This works! Very nice. So RTT can be used with ST-Link also.
Seems like it. Have fun with it!
I'm currently using ITM for log messages via the
itm_logger
crate. This works with openocd, but I see no option to use this here. It seems thatprobe-rs
has some support for it already.