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
<re_irc> <James Munns> I _think_ the docs say this?
<re_irc> <James Munns> But if you can think of somewhere else we should put it, let us know (and let me find where that is in the docs, I saw it recently)
<re_irc> > NOTE: This attribute is exposed by cortex-m-rt only when the device feature is enabled. However, that export is not meant to be used directly – using it will result in a compilation error. You should instead use the device crate (usually generated using svd2rust) re-export of that attribute. You need to use the re-export to have the compiler check that the interrupt exists on the target device.
Shellhound has quit [Read error: Connection reset by peer]
Shell has joined #rust-embedded
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #rust-embedded
causal has joined #rust-embedded
emerent has quit [Ping timeout: 260 seconds]
emerent has joined #rust-embedded
<re_irc> <thebutlah> My "defmt" statements sometimes get logged only after the offending behavior that I'm trying to debug. I think this might be because the logs are _deferred_. Is there a way for me to make it so that "defmt" doesn't return from a log statement until the log has actually been printed?
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #rust-embedded
<re_irc> <ub|k> Slightly off-topic question: does anyone know of a decent open source bike computer? Bonus points if it's in Rust, although my Google searches only find half-made and/or abandoned projects, so not holding my breath.
<re_irc> <ub|k> this one looks really nice, a pity i don't understand Chinese: https://github.com/FASTSHIFT/X-TRACK
<re_irc> <9names (@9names:matrix.org)> eh, just use google translate and some imagination :D
<re_irc> <ub|k> also, where do I get an AT32F435CGU7?
<re_irc> <9names (@9names:matrix.org)> aliexpress or taobao, i'd guess
Shell is now known as Shellhound
<re_irc> <ub|k> didn't find anything on AliExpress
<re_irc> <9names (@9names:matrix.org)> also possible you'd have to buy / get samples direct from the manufacturer
<re_irc> <9names (@9names:matrix.org)> probably easier to substitute a different micro in there. it's just a cortex-m4, not like there's any shortage of those around
<re_irc> <9names (@9names:matrix.org)> ah, they have them at lcsc
<re_irc> <9names (@9names:matrix.org)> well, i mean they sell them at lcsc. they have no stock.
<re_irc> because it's still 2022.
<re_irc> <MathiasKoch> Hmm.. I have a lifetime issue with a CriticalSection, that i could really use some help with.
<re_irc> I have written out the variables here, just for clearance.
<re_irc> pub trait AsVerifier<'a> {
<re_irc> I have some trait "AsVerifier":
<re_irc> <MathiasKoch> Any way to say that 'b lives only within the closure?
<re_irc> <MathiasKoch> * I thought my 'b would only live for the life of my variable "v"?
Foxyloxy has quit [Ping timeout: 268 seconds]
Foxyloxy has joined #rust-embedded
gsalazar has joined #rust-embedded
<re_irc> <dirbaio> if you write "impl<'b, F> ... where F: AsVerifier<'b>", the lifetime "'b" is "chosen by the caller"
<re_irc> <dirbaio> this means your code has to work for any lifetime "'b" the caller chooses
<re_irc> <dirbaio> but it doesn't, it only works when "'b" is one particular lifetime, the one for the variable "v"
<re_irc> <dirbaio> so you have to make it so that the lifetime is "chosen by your code"
<re_irc> <dirbaio> the way to do it is "impl<F> ... where F: for<'b> AsVerifier<'b>"
<re_irc> <dirbaio> "F: for<'b> AsVerifier<'b>" means "for every possible lifetime "'b", "F" implements "AsVerifier<'b>""
<re_irc> <dirbaio> BUT
hwj has joined #rust-embedded
<re_irc> <dirbaio> this sounds like what you really want is GATs. The "for<'a>" thing like that is a super common workaround to simulate GATs in Rust stable without GATs
<re_irc> <dirbaio> if you write your trait like this, it should Just Work`
<re_irc> <dirbaio> * Work
<re_irc> <dirbaio> pub trait AsVerifier {
<re_irc> type Verifier<'a>: signature::Verifier<Signature> where Self: 'a;
<re_irc> fn as_verifier<'a>(&'a mut self) -> Self::Verifier<'a>;
<re_irc> }
<re_irc> <dirbaio> if you write your trait like this, it should Just Work without weird "where" clauses
<re_irc> <dirbaio> MathiasKoch: ^
<re_irc> <MathiasKoch> Thanks! That seems to work as expected! :)
<re_irc> <MathiasKoch> dirbaio: Do you know what it takes to get vscode to not complain about a where clause like that in GAT? same with the GAT where clauses in embassy?
<re_irc> <MathiasKoch> "Syntax Error: expected an item"
<re_irc> <MathiasKoch> dirbaio: Do you know what it takes to get vscode/RA to not complain about a where clause like that in GAT? same with the GAT where clauses in embassy?
<re_irc> <dirbaio> it doesn't complain for me 🤔
<re_irc> <dirbaio> maybe you need to update it?
<re_irc> <dirbaio> (if that's the case you have a super old version, it'd been working fine for a long while)
hwj has quit [Ping timeout: 248 seconds]
hwj has joined #rust-embedded
hwj has quit [Read error: Connection reset by peer]
hwj has joined #rust-embedded
hwj has quit [Ping timeout: 268 seconds]
gsalazar has quit [Ping timeout: 250 seconds]
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
starblue has quit [Quit: WeeChat 3.0]
hwj has joined #rust-embedded
starblue has joined #rust-embedded
hwj has quit [Ping timeout: 252 seconds]
gsalazar has joined #rust-embedded
<re_irc> <thebutlah> Is there a matrix community for asking questions about RISC-V specific stuff?
<re_irc> <thebutlah> +For example, how to interpret the "mepc" register
gsalazar has quit [Ping timeout: 264 seconds]
<re_irc> <almindor> thebutlah: there are specific board rooms (e.g. gd32v Rust one)
dc740 has quit [Remote host closed the connection]
<re_irc> <thebutlah> whats the best way to find those rooms? Is there a search for rooms feature in matrix?
<re_irc> <thebutlah> aha! there is! I'm just dumb! 👍️
<re_irc> <James Munns> The awesome embedded rust list also has some good ones, feel free to add any you see missing :)
hwj has joined #rust-embedded
hwj has quit [Client Quit]
<re_irc> <adamgreig> there's also the #rust-embedded-space:matrix.org (https://matrix.to/#/#rust-embedded-space:matrix.org) space, which should contain all the rooms
<re_irc> <James Munns> (TIL!)
gsalazar has joined #rust-embedded
gsalazar has quit [Ping timeout: 268 seconds]
<re_irc> <jeffrey01> Seems like no one is talking about the BTC-BTC swap! Do you know that $500Bitcoin can get you $35,500.00 worth BTC within 7days of trading but will give me 10% when you get the profit. Send a DM if interested http://WA.ME/+12345295044
cr1901_ has joined #rust-embedded
cr1901 has quit [Ping timeout: 250 seconds]
Foxyloxy has quit [Ping timeout: 268 seconds]
Foxyloxy has joined #rust-embedded