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
zaven[m] has joined #rust-embedded
<zaven[m]> hey team, sometimes my variables section shows the follow value for all variable when I am debugging in VSCode. Can someone here explain what is going ?
<zaven[m]> < Unimplemented: Attribute Value for DW_AT_type DebugInfoRef(DebugInfoOffset(413426)) >
<zaven[m]> * hey team, sometimes my variables section shows the follow value for all variable when I am debugging in VSCode. Is someone here able to explain what is going on? This makes the debugger much less useful.
<zaven[m]> \< Unimplemented: Attribute Value for DW\_AT\_type DebugInfoRef(DebugInfoOffset(413426)) >
rainingmessages has quit [Quit: bye]
rainingmessages has joined #rust-embedded
<zaven[m]> <zaven[m]> "hey team, sometimes my variables..." <- yeah any actual value is not being printed out. the object hierarchy is there, but the value is always this same 'Unimplemented' message
<zaven[m]> <zaven[m]> "yeah any actual value is not..." <- fixed w/
<zaven[m]> lto = false # link-time optimizations
i509vcb[m] has quit [Quit: Idle timeout reached: 172800s]
ivche_ has joined #rust-embedded
ivche has quit [Ping timeout: 244 seconds]
ivche_ is now known as ivche
sroemer has quit [Quit: WeeChat 4.4.2]
sroemer has joined #rust-embedded
limpkin has quit [Ping timeout: 265 seconds]
limpkin has joined #rust-embedded
<thejpster[m]> I also found it useful for making drivers for one-off peripherals (like a PL011 UART) that appear in many different chips at many different addresses.
<thejpster[m]> I've mdae two already this week (although dang-nabbit, my chip is still faulting when I talk to peripherals, even the peripheral I thought I needed to use to turn stuff on so the other stuff would stop faulting)
<JamesMunns[m]> Looks good! Any reason you stuck with `&mut self` for everything vs `&self`?
<JamesMunns[m]> Also do you limit all the fields to be specific (integer?) types? I know someone mentioned that using a field as bool and reading a value other than 0/1 would be UB, and using volatile ops on values larger than the atomic load width would probably be sus
<JamesMunns[m]> and maybe feature request: some kind of generated alignment/padding test (like what bindgen does)? to make sure you don't do something like:... (full message at <https://catircservices.org/_irc/v1/media/download/AdOsZLqAPmQMFumgkUCaSPbRpRmog3baJN0BIFqImF1UNAZbrtK9KV5AeGz90AHFDReh-nV9PR1y5G_TbDwB-mC_8AAAAAAAAGNhdGlyY3NlcnZpY2VzLm9yZy9xYllWc3BRQkxPenNGTE91VVRCZUlLWWo>)
<JamesMunns[m]> (I'll go make issues for these so they don't get lost)
<thejpster[m]> Yup, it’s a sharp tool. Unclear currently how blunt I should make it. Safety vs utility, etc.
<JamesMunns[m]> Yeah, no judgement if you don't check everything, but would be good to at least document all the places it can cut you :p
danielb[m] has quit [Quit: Idle timeout reached: 172800s]
ni has quit [Quit: WeeChat 3.8]
ni has joined #rust-embedded
ni has quit [Quit: WeeChat 3.8]
ni has joined #rust-embedded
MathiasKoch[m] has joined #rust-embedded
<MathiasKoch[m]> I need some help with a simple match case here.
<MathiasKoch[m]> How to match mutable reference to self here, without moving self in the match condition?
<MathiasKoch[m]> #[derive(Debug, PartialEq, Eq)]
<MathiasKoch[m]> s/#[derive(Debug, PartialEq, Eq)]/https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=319bc2e157c2e9ed8c9cc17efdd99141/
<MathiasKoch[m]> ahhh.. thank you! seems so fucking obvious!
<MathiasKoch[m]> Now all my tests pass again. Thanks!
<dirbaio[m]> also you can remove the ref mut
<MathiasKoch[m]> 👍️
<thejpster[m]> James Munns: I added a padding check and RO field support. I don't love the proc-macro code, but it works well enough for the user.
<JamesMunns[m]> I just wanted to capture my initial thoughts, no need to prioritize anything on my behalf :)
diondokter[m] has joined #rust-embedded
<diondokter[m]> Not loving the proc-macro code is common occurance :P
<diondokter[m]> s/occurance/occurrence/
bogdan[m] has quit [Quit: Idle timeout reached: 172800s]
<thejpster[m]> why is there both proc_macro and proc_macro2? Why is it so messy trying to get a list of attributes?
<dirbaio[m]> proc_macro can only be used from actual proc macro crates
<dirbaio[m]> proc_macro2 is a copy of it that you can use from regular Rust code, for example you need it if you want to write tests that use it
<dirbaio[m]> yes, it sucks
<thejpster[m]> Ok, so that’s why quote! returns a proc_macro2::TokenStream?
<dirbaio[m]> yep
<thejpster[m]> I mean it’s not that bad. It only took a couple of hours to write my first derive macro. I’m just out of my depth, and I didn’t find any good guides on the subject.
vollbrecht[m] has joined #rust-embedded
<vollbrecht[m]> There is still the OG proc macro workshop from dtolnay https://github.com/dtolnay/proc-macro-workshop though not sure from memory if he goes into proc_macro vs proc_macro2
sourcebox[m] has joined #rust-embedded
<sourcebox[m]> Just want to remind you of the topic. Nothing has happened in the last weeks.
balbi[m] has joined #rust-embedded
<balbi[m]> is it possible to have svd2rust generate 8-bit, 16-bit, and 32-bit accessors for the register address? My HW behaves differently given the write size.
<balbi[m]> oh, maybe alternateGroup helps
jannic[m] has joined #rust-embedded
<jannic[m]> <balbi[m]> "is it possible to have svd2rust..." <- Would be interesting to avoid the need for code like this: https://github.com/Neotron-Compute/Neotron-BMC/blob/main/neotron-bmc-pico/src/spi.rs#L221-L231
<balbi[m]> seems to work fine, let me push an update to our PAC, I'll send a link shortly
<balbi[m]> <balbi[m]> "seems to work fine, let me..." <- yup, works well. Here's the pac: https://crates.io/crates/mimxrt685s-pac
<balbi[m]> the change is in the CRC_ENGINE peripheral, specifically WR_DATA register. docs.rs should update shortly (v0.3.0 is what you want)
<jannic[m]> Looks like someone already did that for stm32-rs. https://github.com/stm32-rs/stm32-rs/blame/master/devices/patches/spi/dr8.yaml
<jannic[m]> Thanks, burrbull!