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
M9names[m] has quit [Quit: Idle timeout reached: 172800s]
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<morfertaw[m]> <haobogu[m]> "Did you try to prepend the..." <- I tried prepending the report id today, but that does not work either.
MichaelEden[m] has quit [Quit: Idle timeout reached: 172800s]
owlfed[m] has quit [Quit: Idle timeout reached: 172800s]
pflanze_ has joined #rust-embedded
pflanze has quit [Read error: Connection reset by peer]
sauce has quit [Ping timeout: 260 seconds]
badyjoke[m] has joined #rust-embedded
<badyjoke[m]> Hello ! Has anyone tried using https://github.com/lobaro/FreeRTOS-rust ? I get this error :
<badyjoke[m]> ``````
<badyjoke[m]> * Hello ! Has anyone tried using https://github.com/lobaro/FreeRTOS-rust ? I get this error :... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/mzBJTJDmGCefjdUMlFFotsXR>)
<badyjoke[m]> And I can't see a way of reducing the size
<JamesMunns[m]> That's telling you that your static RAM usage, (.bss and .uninit) don't fit into the RAM region. If you are building in release mode, and the linker script is correct (e.g. not undersized for your chip), there's not much to be done. I'm not sure how configurable freertos-rust is.
sauce has joined #rust-embedded
m5zs7k has quit [Ping timeout: 246 seconds]
m5zs7k has joined #rust-embedded
<Lumpio-> Then again just FreeRTOS should not take that much, make sure you're in release mode first I guess
thejpster[m] has joined #rust-embedded
<thejpster[m]> You could also look at https://github.com/ferrous-systems/freertos-experiments
<thejpster[m]> I think freertos uses only what you tell it to use.
<JamesMunns[m]> diondokter saw this in `cargo bloat` today and thought of you lol:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/FbARpWzEECnchCAQuayyKVJw>)
<diondokter[m]> Yep! That's the one
IlPalazzo-ojiisa has joined #rust-embedded
<diondokter[m]> Gonna fix that up soon hopefully
sauce has quit [Ping timeout: 260 seconds]
sauce has joined #rust-embedded
sauce has quit [Ping timeout: 256 seconds]
<morfertaw[m]> <morfertaw[m]> "I tried prepending the report id..." <- Curiously, I used a usb sniffer to see the hid descriptor. Without the report id it was able to return the hid descriptor but when I added the report id it was no longer able to show the hid descriptor.
<morfertaw[m]> morfertaw[m]: Here is the hid report descriptor with the id. `const KEYBOARD_ID: u8 = 0x01;... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/qAqQGxpKaaemVRaTeJkOctgK>)
<morfertaw[m]> * Here is the hid report descriptor with the id.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/qNeIhSZRGbYhvqCrjwXQNgJV>)
<morfertaw[m]> * Here is the hid report descriptor with the id.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/YagUrbclpWxzXUSjelzmQkTx>)
<morfertaw[m]> * Here is the hid report descriptor with the id.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/RxypiMbGaRDTkbBUwOHNmEFC>)
sauce has joined #rust-embedded
sauce has quit [Ping timeout: 272 seconds]
sauce has joined #rust-embedded
haobogu[m] has quit [Quit: Idle timeout reached: 172800s]
alexmoon[m] has joined #rust-embedded
<alexmoon[m]> <morfertaw[m]> "Here is the hid report descripto..." <- > <@morfertaw:matrix.org> Here is the hid report descriptor with the id.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/saIDkMGdFlcRcsEdNnBUAsYd>)
<badyjoke[m]> The issue I had was comming from my FreeRTOSConfig.h. I took an already existing one without cheeking the minimal stack size and total head size. 🥲
<badyjoke[m]> s/head/heap/
sirhcel[m] has joined #rust-embedded
<sirhcel[m]> Henk: Just saw your pr [discovery/#568](https://github.com/rust-embedded/discovery/issues/568) and to me it looks like the last sentence of the description should read _[...] The goal is for the book in this repo to only support Microbit:V2_. Is this right? I'd like to ask you here before making such noise in the gh discussion.
<sirhcel[m]> * Henk: Just saw your pr [discovery/#568](https://github.com/rust-embedded/discovery/issues/568) and to me it looks like the last sentence of the description should read _\[...\] The goal is for the book in this repo to only support Microbit:V2_. Is this right? I'd like to ask you here before making such nitpicking noise in the gh discussion.
<sirhcel[m]> * Henk: Just saw your pr [discovery/#568](https://github.com/rust-embedded/discovery/issues/568) and to me it looks like the last sentence of the description should read _\[...\] The goal is for the book in this repo to only support Microbit:V2_. Is this right? I'd like to ask you here before making such nitpicking noise in the gh issue.
<Henk[m]> <sirhcel[m]> "Henk: Just saw your pr [..." <- Oops, yeah that seems fairly vital. Thanks for the heads up
Henk[m] has joined #rust-embedded
<sirhcel[m]> Henk[m]: The internet is right again. 😅 Thank you for the quick fix.
<cr1901> diondokter[m]: At a high-level, how does sequential-storage handle "old key written with new value"? Does erase/rewrite happen immediately, or does sequential-storage try another page first (to avoid an erase cycle)?
<dirbaio[m]> it doesn't modify it in-place, it writes a new copy of the key at the end. both to save on erases, and to ensure it's power-fail-safe.
<cr1901> How does sequential-storage know to use the new copy?
<dirbaio[m]> last one wins
<cr1901> ahh
<cr1901> Anyways, I just got confirmation that my menu UI survives saving cfg to EEPROM :D
<cr1901> I just don't want a nasty "EEPROM is full" surprise as I'm repeatedly testing writing configs
<cr1901> Would that be expected during normal operation (and thus I should include an "erase?" ui at the beginning), or should sequential-storage automatically try hard to avoid "EEPROM is full" if I'm repeatedly overwriting old keys w/ new values?
<dirbaio[m]> when it gets full it does some sort of "GC" I think
<dirbaio[m]> deleting "dead" versions of keys
<diondokter[m]> Kinda
<cr1901> Maybe I'll include an "erase?" UI just in case with cursor on "No" by default. My erase implementation is horrific anyway and I need to redo it.
<diondokter[m]> When it's full we're gonna erase the oldest page. But before that we see if the oldest page contains any key that isn't found in any of the newer pages. If it is the only one, it's migrated to the buffer page
<diondokter[m]> You can calculate whether all keys fit
<diondokter[m]> Only if there's literally no more space to store it after all key duplication is removed will it return that the storage is full
<cr1901> Okay cool, works for me
<diondokter[m]> Btw, do check out the readme. A lot of stuff like this is written there
GuineaWheek[m] has joined #rust-embedded
<GuineaWheek[m]> i'm not super knowledgeable about how cargo works but i'm getting this error with defmt 0.3.7:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/ASSZleYbeoDhLDSptdyoTVQO>)
<GuineaWheek[m]> downgrading doesn't seem to help either...
mameluc[m] has joined #rust-embedded
<mameluc[m]> hmm thought it should have been defmt_03 but there is a crate:defmt_03 as defmt
<GuineaWheek[m]> it all seemed to compile fine before today..
<GuineaWheek[m]> in my cargo.toml i have embedded-hal = { version = "1.0.0", features = ["defmt-03"]}
<mameluc[m]> try cargo clean?
<GuineaWheek[m]> still nope
<GuineaWheek[m]> defmt pushed out a new point release today and i'm not sure what happened
<mameluc[m]> what rust toolchain version are you on?
<GuineaWheek[m]> how do i check this again
<mameluc[m]> idk actually. I just run rustup update when in doubt 😅
<mameluc[m]> or I have an rust-toolchain.toml file
<mameluc[m]> my thinking is that maybe something in the change doesn't play nice with some old nightly version or something making defmt fail.
<GuineaWheek[m]> still persists after rustup update
<diondokter[m]> Hmmm yeah, looks like defmt 3.7 bumped the msrv to at least a version of the compiler that includes the core::net module
<cr1901> diondokter[m]: Ack re: "read next time" :D
Lumpio[m] has quit [Quit: Idle timeout reached: 172800s]
<diondokter[m]> GuineaWheek[m]: Can you see two different versions of defmt being used if you do `cargo tree -i defmt`?
<GuineaWheek[m]> everything is only using v0.3.7
<diondokter[m]> Ok good
<mameluc[m]> do you have a rust-toolchain.toml file?
<diondokter[m]> What's the output of cargo -V? (In the root of your project)
<mameluc[m]> rustup show actually shows what version is being used
<diondokter[m]> That works as well
<GuineaWheek[m]> cargo 1.80.0-nightly (4de0094ac 2024-05-09)
<mameluc[m]> ooh cargo -V is even nicer. TIL
<diondokter[m]> GuineaWheek[m]: That should do fine as well
<diondokter[m]> Ah yes, I can reproduce when I import embedded-hal with the defmt-03 features
<diondokter[m]> * Ah yes, I can reproduce when I import embedded-hal with the defmt-03 feature
<diondokter[m]> Not sure what's going on
<diondokter[m]> I've got a feeling of what might be happening. This happens in embedded-hal where they renamed defmt to defmt-03. Perhaps that's now broken
<diondokter[m]> Yeah, with defmt 3.6 everything compiles fine
jotthyr[m] has quit [Quit: Idle timeout reached: 172800s]
<diondokter[m]> Ok, with defmt at 0.3.7 it still compiles. Let's update the macros crate
<diondokter[m]> Yeah, now it breaks
<diondokter[m]> It is something that changed in the macros
<diondokter[m]> Same errors if you do cargo check --features defmt-03 on the embedded-hal crate directly
<diondokter[m]> Urhengulas: If you see this, I think this is important to fix
<diondokter[m]> Guinea Wheek: I suggest pinning `defmt-macros` to the previous version
StephenD[m] has quit [Quit: Idle timeout reached: 172800s]
KurtisDinelle[m] has joined #rust-embedded
<KurtisDinelle[m]> Hey everyone, pretty new to Rust in general but I'm working on an embedded-hal driver for an I2C device. I want my driver to support both async and regular blocking I2C calls. The only difference is that the blocking version doesn't use .await after I2C calls or declare its functions async.
<KurtisDinelle[m]> Currently I use the duplicate crate to create two copies of the driver implementation (so I didn't have to manually maintain two very slightly different copies) as seen here: https://github.com/kurtjd/tsl2591-rs/blob/main/src/lib.rs#L161
<KurtisDinelle[m]> But I'm wondering if there is a better, "proper" way to handle this. Haven't been able to find any drivers that try to do this as an example, so not too sure. Any advice appreciated!
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<diondokter[m]> KurtisDinelle[m]: > <@kurtjd:matrix.org> Hey everyone, pretty new to Rust in general but I'm working on an embedded-hal driver for an I2C device. I want my driver to support both async and regular blocking I2C calls. The only difference is that the blocking version doesn't use .await after I2C calls or declare... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/XVICAcxguftzbBBdPRCxTRjX>)
<diondokter[m]> In any case, I think everyone has a different opinion on supporting sync and async. There is no *proper* way.
<diondokter[m]> However, do keep in mind that async is not just blocking with some extra keywords. People can cancel futures and ideally everything should still be fine or it's documented somewhere what the possible effects of the cancellation are
<KurtisDinelle[m]> diondokter[m]: > <@diondokter:matrix.org> In any case, I think everyone has a different opinion on supporting sync and async. There is no *proper* way.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/uBKFTxmTVoyjamgImQbsKFxA>)
ivche_ has joined #rust-embedded
ivche has quit [Ping timeout: 268 seconds]
ivche_ is now known as ivche