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
GuineaWheek[m] has joined #rust-embedded
<GuineaWheek[m]> i'm kinda interested in how we can model dma better tbh
<GuineaWheek[m]> embassy has a nice model for "what if this but async"
<GuineaWheek[m]> but embassy is not the be all end all
korbin[m] has joined #rust-embedded
<korbin[m]> GuineaWheek[m]: periph->periph trigger/destination/target was awkward when writing this for the imxrt
<korbin[m]> hard to cover all the common cases
<GuineaWheek[m]> i really hate how stm32-rs hals require you to like give ownership of the entire peripheral to a transfer
<korbin[m]> havent looked at those in a while, but i would like a DMA abstraction that covers periph->periph, periph->memory, memory->periph
Foxyloxy has joined #rust-embedded
Foxyloxy_ has quit [Ping timeout: 248 seconds]
Foxyloxy has quit [Read error: Connection reset by peer]
Lumpio- has quit [Ping timeout: 272 seconds]
Lumpio- has joined #rust-embedded
sroemer has joined #rust-embedded
ska has quit [Ping timeout: 252 seconds]
JamesMunns[m] has quit [Quit: Idle timeout reached: 172800s]
<Ralph[m]> just wondering: is the `.x` extension for linker scripts an official thing or just used in rust circles? i couldn't find anything about it. there's no mention of file names / extensions here: https://sourceware.org/binutils/docs/ld/Scripts.html
<Ralph[m]> and `tokei` lists the `.x` extension as "Alex" (whatever that's supposed to be?): https://github.com/XAMPPRocky/tokei/blob/45e5df6af5b80b5cb2f8acd2ee2c14c56fbe6ad5/languages.json#L28-L30
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]> I don't know where it's from, I think japaric chose it because it is a "linker fragment" vs a full `.ld` linker script
<JamesMunns[m]> JamesMunns[m]: Appears to have some history in GCC and/or I've seen some AVR projects that use/used it? https://sourceware.org/legacy-ml/crossgcc/2000-11/msg00004.html
<JamesMunns[m]> Could just have been japaric's priors in 2014-2018 or so.
<zeenix[m]> Would anyone know why I'm cursed here: https://github.com/rust-embedded/wg?tab=readme-ov-file#members-5
<zeenix[m]> When I edit the md, everything looks in order
<JamesMunns[m]> you probably need to add the link down in lines 386-437
<zeenix[m]> ah :)
<zeenix[m]> I thought there was some GH smartness here
<JamesMunns[m]> I think `@zeenix` would work, but `[@zeenix]` requires a link. I don't know why we do the latter
<zeenix[m]> right. Thanks James Munns . https://github.com/rust-embedded/wg/pull/861 fixes it hopefully :)
<Ralph[m]> <JamesMunns[m]> Appears to have some history in GCC and/or I've seen some AVR projects that use/used it? https://sourceware.org/legacy-ml/crossgcc/2000-11/msg00004.html...
<Ralph[m]> thanks for digging that up!
<Ralph[m]> let's see if `tokei` might recognise them as linker scripts instead in the future...: https://github.com/XAMPPRocky/tokei/issues/1272
ska has joined #rust-embedded
mrpashapg[m] has quit [Quit: Idle timeout reached: 172800s]
DominicFischer[m has quit [Quit: Idle timeout reached: 172800s]
andreas-leitner[ has quit [Quit: Idle timeout reached: 172800s]
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
<zeenix[m]> reitermarkus: Hi, looks like I still need you to get the heapless release out: https://github.com/rust-embedded/heapless/pull/571#issuecomment-3156533226
Foxyloxy has joined #rust-embedded
Pete[m]1 has joined #rust-embedded
<Pete[m]1> Design related question: Coming from the Zephyr world, drivers there use a clear split of "config vs data" structures, so that anything that can be placed into ROM and save RAM can do so... I'm wondering how folks generally approach that for rust code? Pass around/use the mutable thing, and that has a ref to some static struct holding your config?
<Pete[m]1> * holding your "config, * config"?
i509vcb[m] has joined #rust-embedded
<i509vcb[m]> If you can stuff your config types into a `const` it will end up in flash
<i509vcb[m]> And don't need to modify it during use
<Pete[m]1> AFAIK, const ends up creating duplicates of the data under the hood, static is what I really want in Rust land?
<Pete[m]1> I know that's the technical way to ensure an item is (linker/target dependent) placed into ROM, I mean how to design your types to effectively leverage that cleanly.
<i509vcb[m]> So static can sometimes end up in ram
<i509vcb[m]> But only if there is interior mutability
<Pete[m]1> Good to know, thanks.
<i509vcb[m]> If you need to ensure it's in flash you could annotate the definition with a specific link section
<i509vcb[m]> Although if your config is used as a owned value and not borrowed when it will probably end up being copied to the stack when used
<i509vcb[m]> s/when/then/
<i509vcb[m]> An immutable reference can point to flash.
<Pete[m]1> Yeah, that makes sense, my intention would be to pass non-mut refs to that data everywhere to avoid that.
<i509vcb[m]> Speaking of that, I recall some embassy hals don't always use borrowed configs?
ouilemur has quit [Quit: WeeChat 4.7.0]
mrpashapg[m] has joined #rust-embedded
ouilemur has joined #rust-embedded
<i509vcb[m]> You are doing 5V pull ups. Is your IO 3.3V?
<i509vcb[m]> Which is allowed if the pins you chose are 5V tolerant
<mrpashapg[m]> i509vcb[m]: No, everything works with 5V - both the DS1307 RTC module (which worked perfectly and successfully drove my EEPROM) and the EEPROM itself which connects at 5V
<mrpashapg[m]> i509vcb[m]: Yes, they're all 5V
<i509vcb[m]> I'd question your pull ups if removing those fixes it
<i509vcb[m]> Loose connection on breadboard.
<i509vcb[m]> s/./?/
<i509vcb[m]> You sure you didn't enable any on board pull ups on the controller?
chrysn[m] has joined #rust-embedded
<chrysn[m]> Working towards the stabilization of embedded-io, I started refactoring the windowed-infinity crate (a write implementation that sends bytes from a certain offset into a given buffer slice, and discards the rest), and one output of the refactoring would have been called embedded-io-adapters.
<mrpashapg[m]> i509vcb[m]: No, when I remove them completely, it doesn't work at all. However, when I disconnect those resistors and connect the DS1307 RTC module to the I2C bus instead, everything works fine. This is because the pre-built module has internal 3.3kΩ pull-up resistors that properly pull the I2C bus HIGH, making the communication work correctly
<chrysn[m]> I was about to check whether there was a crate that already did some of that, and found that there is even a crate of that name :-D
<chrysn[m]> Just that it doesn't adapt to *all* the crates I need adapting to (eg. not to core::fmt::Write) -- dirbaio, would PRs extending this to core::fmt::Write and the cryptographic hash Digest crates be welcome there?
<chrysn[m]> (Or that's probably more a question to the team; I just saw your name stand out as crate owner.)
<dirbaio[m]> core::fmt sure
<dirbaio[m]> what's the Digest trait?
<chrysn[m]> basically any cryptographic hash (so that your writes don't go into a buffer but you calculate the checksum from the same producer that'd otherwise send the content to a file)
<chrysn[m]> The hash digest crate providing the trait is maintained by rustcrypto team, and has not had a stable release yet.
<dirbaio[m]> this one?
<dirbaio[m]> that's supposed to be implemented by structs that implement some hashing algo, it wouldn't make sense to impl it for e-io
<dirbaio[m]> or you mean the other way around, an adapter that impls e-io::Write and forwards the written bytes to a digest?
<chrysn[m]> The latter, yes. In a sense it's an adapter in the other direction.
<chrysn[m]> (My tentative local embedded-io-adapters has a few more in both directions, eg. implementing the minicbor::Write trait, but I also have a minicbor-adapters crate that can take care of that one).
<dirbaio[m]> feels a bit niche?
<dirbaio[m]> the digest crate itself doesn't provide that for std::io
<dirbaio[m]> and the rust-crypto crates aren't known for their stability šŸ˜…
<chrysn[m]> That's a good criterion (maybe I'll even PR a statement about that for the embedded-io-adapters' README). Then that'll go into ... extra-embedded-io-adapters or something :-)
andar1an has joined #rust-embedded
<chrysn[m]> Thanks, PR(s?) will come up depending on how long my current environment will let me work šŸŒ„.
<mrpashapg[m]> <mrpashapg[m]> Having issues with I2C pull-up resistor setup....
<mrpashapg[m]> I folded the resistor leads twice over themselves, making their diameter four times thicker than the original when inserted into the breadboard. However, I’m still getting a timeout error
<firefrommoonligh> I.e. need to narrow down what works and what doesn't
andar1an has quit [Quit: andar1an]
<chrysn[m]> <chrysn[m]> Thanks, PR(s?) will come up depending on how long my current environment will let me work šŸŒ„.
<chrysn[m]> Turned out that change was already in, but unreleased; requesting release in https://github.com/rust-embedded/embedded-hal/pull/675
sroemer has quit [Quit: WeeChat 4.5.2]
M9names[m] has quit [Quit: Idle timeout reached: 172800s]
jcroisant has quit [Quit: Connection closed for inactivity]