ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
IlPalazzo-ojiisa has quit [Quit: Leaving.]
fabic_ has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
starblue has quit [Ping timeout: 248 seconds]
starblue has joined #rust-embedded
fabic_ has quit [Ping timeout: 255 seconds]
fabic_ has joined #rust-embedded
<re_irc> <@ithinuel:matrix.org> Has anyone here tried to test expected compilation error?
<re_irc> I tried "compiletest_rs" (https://crates.io/crates/compiletest_rs) and found but tried "trybuild" (https://crates.io/crates/trybuild) but none seem to handle the cross compilation + nostd usecase really smoothly.
<re_irc> <@adamgreig:matrix.org> : The cortex-m-rt CI has a bunch of compilation error testing, might be a place to check
<re_irc> <@jannic:matrix.org> Ok, the low-tech variant. Just call the compiler from a shell script and check the return code. Simple and effective.
<re_irc> <@jannic:matrix.org> for ex in "${fail_examples[@]}"; do
<re_irc> ! cargo rustc --target "$TARGET" --example "$ex" -- $linker
<re_irc> done
<re_irc> ! cargo rustc --target "$TARGET" --example "$ex" --release -- $linker
fabic has joined #rust-embedded
fabic_ has quit [Ping timeout: 264 seconds]
IlPalazzo-ojiisa has joined #rust-embedded
bjc has joined #rust-embedded
dc740 has joined #rust-embedded
<re_irc> <@halfbit:matrix.org> Is there a simple way to get defmt working with a uart?
<re_irc> <@halfbit:matrix.org> tried defmt-print -e myelf < /dev/ttyACM1
<re_irc> <@dirbaio:matrix.org> https://crates.io/crates/defmt-serial
<re_irc> <@dirbaio:matrix.org> ah yeah, that's the target side, but you still need "defmt-print" on the host side
<re_irc> <@dirbaio:matrix.org> what's the issue with defmt-print?
<re_irc> <@dirbaio:matrix.org> you want defmt to print the actual strings over uart, so it works with any serial terminal viewer?
<re_irc> <@halfbit:matrix.org> I want to take the data from a uart and print it
<re_irc> <@halfbit:matrix.org> I see defmt data coming, but it won't print on the console
<re_irc> <@halfbit:matrix.org> so... either the defmt logging is wrong on the target side, or maybe I'm missing some concoction to get the tty stream setup right on the host
<re_irc> <@dirbaio:matrix.org> what're you using to send the bytes from defmt over serial?
<re_irc> <@halfbit:matrix.org> yeah I guess I should just try the defmt-rtt stuff
<re_irc> <@dirbaio:matrix.org> hard to know what's wrong from a quick look
<re_irc> <@dirbaio:matrix.org> the "let _ = crate::try_write_producer(...)" thing sounds like it could lose bytes
fabic has quit [Ping timeout: 255 seconds]
ross12300 has joined #rust-embedded
ross12300 has quit [Ping timeout: 260 seconds]
<re_irc> <@firefrommoonlight:matrix.org> Hi! Does anyone know how to set up a Cortex-m systick interrupt? Thank yoU!
Foxyloxy has quit [*.net *.split]
m5zs7k has quit [*.net *.split]
inara` has quit [*.net *.split]
rektide_ has quit [*.net *.split]
wose has quit [*.net *.split]
rektide_ has joined #rust-embedded
wose has joined #rust-embedded
Foxyloxy has joined #rust-embedded
inara` has joined #rust-embedded
m5zs7k has joined #rust-embedded
<re_irc> <@burrbull:matrix.org> : it is exception
<re_irc> <@firefrommoonlight:matrix.org> Do you have a syntax example? Thx!
<re_irc> <@dirbaio:matrix.org> "#[exception] fn SYSTICK () { ... }"
<re_irc> <@dirbaio:matrix.org> * SysTick
<re_irc> <@dirbaio:matrix.org> documented here https://docs.rs/cortex-m-rt/latest/cortex_m_rt/attr.exception.html
<re_irc> <@firefrommoonlight:matrix.org> Perf
<re_irc> <@firefrommoonlight:matrix.org> Is there a way to make that work with RTIC? I've tried this, but neither fire. Maybe some type of unmasking?
<re_irc> /// Systick time keeper, since program start, in ms. Could alternatively use the RTC instead.
<re_irc> /// Lowest priority.
<re_irc> fn systick_isr(_cx: systick_isr::Context) {
<re_irc> #[task(binds = SysTick, priority = 1)]
<re_irc> println!("TICK");
<re_irc> TIME_SINCE_START_MS.fetch_add(1, Ordering::Relaxed);
<re_irc> }
<re_irc> #[exception]
<re_irc> fn SysTick() {
<re_irc> println!("tick");
<re_irc> }
<re_irc> <@firefrommoonlight:matrix.org> Neither seems to fire
<re_irc> <@9names:matrix.org> Have you looked at https://github.com/rtic-rs/systick-monotonic?
<re_irc> <@firefrommoonlight:matrix.org> No; thx; will check out
<re_irc> <@firefrommoonlight:matrix.org> Was hoping to have a normal interrupt instead of monotonic, but if that's the way, I'll do it
<re_irc> <@firefrommoonlight:matrix.org> Or just use the RTC (no i) instead to get timestamps...
<re_irc> <@firefrommoonlight:matrix.org> (I am logging parameters @ around 1khz, then updating a model fitting them; need timestamps to weight reading time etc prioritizing new readings)
<re_irc> <@firefrommoonlight:matrix.org> Or could use a hardware timer since that's a MCU periph so will work with normal interrupts (RTIC tasks)
rardiol has joined #rust-embedded
rardiol has quit [Ping timeout: 255 seconds]
rardiol has joined #rust-embedded
crabbedhaloablut has quit [Ping timeout: 255 seconds]
crabbedhaloablut has joined #rust-embedded
rardiol has quit [Ping timeout: 255 seconds]
rardiol has joined #rust-embedded