<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
<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.
<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
<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