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
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 264 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
cr1901_ has quit [Ping timeout: 240 seconds]
cr1901 has joined #rust-embedded
pronvis has joined #rust-embedded
cr1901 has quit [Ping timeout: 246 seconds]
pronvis has quit [Ping timeout: 268 seconds]
cr1901 has joined #rust-embedded
pronvis has joined #rust-embedded
Charles[m]11 has joined #rust-embedded
PinballWIzard[m4 has joined #rust-embedded
Charles[m]1 has quit [Ping timeout: 268 seconds]
PinballWIzard[m] has quit [Ping timeout: 268 seconds]
<M9names[m]> <zachariasfrings[> "> <@9names:matrix.org> the hal..." <- i'm not sure i understand the question, but if you're asking how to use the hd44780-driver crate the best places to look are the docs:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/zFZFpnCyZcdtPHhgLdtTAuRp>)
<M9names[m]> this is true for basically every crate out there. most have at least got examples, even if they don't have any docs.
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
m5zs7k has quit [Ping timeout: 260 seconds]
m5zs7k has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
m5zs7k has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
m5zs7k has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
djdisodo[m] has quit [Quit: Idle timeout reached: 172800s]
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
David[m]12 has joined #rust-embedded
<David[m]12> I'm using the `singleton!()` macro to create a `&'static mut` of my type in my FW init, and I want to move the ownership of this reference to my IRQ handler. Is there a "best/cleanest" way to achieve this?
pronvis has quit [Ping timeout: 268 seconds]
ryan-summers[m] has quit [Quit: Idle timeout reached: 172800s]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
sourcebox[m] has quit [Quit: Idle timeout reached: 172800s]
<JamesMunns[m]1> <David[m]12> "I'm using the `singleton..." <- It's difficult for IRQs to "own" anything, as they have no persistent context, and can be called multiple times. Are you using RTIC or Embassy or anything? Or just building the application directly?
<JamesMunns[m]1> Both Embassy and RTIC provide tools to allow you access to resources, though typically in Embassy the drivers will handle interrupts for you automatically.
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
thejpster[m] has joined #rust-embedded
<thejpster[m]> How do I get github to stop pinging me for reviews on rust-embedded repos?
pronvis has quit [Ping timeout: 268 seconds]
<JamesMunns[m]1> <thejpster[m]> "How do I get github to stop..." <- https://github.com/watching
<David[m]12> <JamesMunns[m]1> "It's difficult for IRQs to "own"..." <- Maybe "own" isn't the best word. I set up and start a peripheral in my init method, giving me `&'static mut T`, and then I want to access that in the IRQ and only the IRQ for the rest of the program
<David[m]12> David[m]12: I am using Embassy but I am writing my own interrupt handler in this case
<David[m]12> David[m]12: This is what I currently am doing... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/vNWevcnvFdDoicXYXswFgzaD>)
<thejpster[m]> No, It’s pinging me because it still thinks I’m in a team
pronvis has joined #rust-embedded
<JamesMunns[m]1> <thejpster[m]> "ima_63cc57d.png" <- yeah, you might need to manually unfollow anything you were subscribed to already: https://github.com/notifications/subscriptions?reason=team_mention
<JamesMunns[m]1> JamesMunns[m]1: there's the subscription tab where you can filter by "reason", which might help drill it down.
<JamesMunns[m]1> <David[m]12> "This is what I currently am..." <- > <@davidcole1340:matrix.org> This is what I currently am doing... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/mCRPSpEuZIheXzDBepzCvuMM>)
<JamesMunns[m]1> <JamesMunns[m]1> "> <@davidcole1340:matrix.org..." <- > <@jamesmunns:beeper.com> Gotcha! Yeah - basically I'm not sure how to do it better than that in "safe" + "userspace" code, if that makes sense?... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/DQlceujltQCjcIuimahLAoqg>)
<JamesMunns[m]1> JamesMunns[m]1: David if you think you'd be interested in writing something like that, I can give you some more notes about how I'd do it, and I'd be happy to review the PR for it!
a2800276 has quit [Ping timeout: 256 seconds]
a2800276 has joined #rust-embedded
<thejpster[m]> subscriptions aren't the problem - it's that I'm still in these teams: https://github.com/orgs/rust-embedded/teams/tools
<thejpster[m]> probably because https://github.com/rust-lang/team/blob/master/teams/wg-embedded-tools.toml still contains me.
<thejpster[m]> Whose job is it to update the official project team repo when someone PR's the WG's team repo?
pronvis has quit [Remote host closed the connection]
pronvis has joined #rust-embedded
<thejpster[m]> did it myself: https://github.com/rust-lang/team/pull/1471
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 252 seconds]
firefrommoonligh has joined #rust-embedded
<firefrommoonligh> <David[m]12> "This is what I currently am..." <- Use a critical section in the ISR. LMK if you need an example
<firefrommoonligh> firefrommoonligh: Use the CS to unpack your Mutex; this gives you a mutable ref to the global
<firefrommoonligh> firefrommoonligh: Use macros if the syntax becomes unpleasant, which is likely
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
Curid[m] has joined #rust-embedded
<Curid[m]> > Nope. In fact I have a drone engine running C code on 8K of RAM and Rust would never be able to run on it.
<Curid[m]> is this true? https://matrix.to/#/!bUUVbPAXYHHAWqLRkc:matrix.org/$dK38kC098J8JeTssftxxHqS8YLc9yNuqxmE5gx0iMuU?via=matrix.org&via=tchncs.de&via=mozilla.org
diondokter[m] has joined #rust-embedded
<diondokter[m]> Curid[m]: > <@curid:matrix.org> > Nope. In fact I have a drone engine running C code on 8K of RAM and Rust would never be able to run on it.... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/IfHfxqRGQfkHNiqVerexDSZo>)
richardeoin has joined #rust-embedded
<thejpster[m]> Curid: here's a Rust application (an SPI-controlled device that operates a buzzer, some LEDs, some buttons and a PS/2 keyboard) which works in 4K of RAM - https://github.com/Neotron-Compute/Neotron-BMC/blob/main/neotron-bmc-pico/memory.x
<thejpster[m]> We know that things like the panic! and write! macros generating some fairly chunky machine code, but that takes up Flash, not RAM. Generally RAM usage isn't too bad.
AtleoS has quit [Ping timeout: 252 seconds]
AtleoS has joined #rust-embedded
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
pbsds3 has quit [Ping timeout: 240 seconds]
pbsds3 has joined #rust-embedded
<Lumpio-> The most complains I've heard about excessive RAM usage in Rust is when people return/move large-ish things on stack and the compiler does not optimize it properly and it allocates like 4x the stack space for copies
<Lumpio-> Flash usage can get a bit out of hand though.
<Lumpio-> Other than that the RAM usage is usually pretty reasonable.
<diondokter[m]> Lumpio-: Working on it! https://github.com/rust-lang/rust/issues/125612
mabez[m] has quit [Quit: Idle timeout reached: 172800s]
vollbrecht[m] has quit [Quit: Idle timeout reached: 172800s]
Danilo[m] has quit [Quit: Idle timeout reached: 172800s]
<barafael[m]> Curid: Here is an application using embassy to drive an i2c display where a little logo gradually slides from one random location to the next while blinking an led. The target has 2k SRAM and 16k flash (10 Cent MCU by wch). Looking for ideas what else to add to it
<barafael[m]> It's using embassy for concurrency. Is this 8k ram drone controller public somewhere?
<cr1901> Curid[m]: https://github.com/cr1901/AT2XT Rust in 2kB flash, 128 bytes of RAM
pronvis has quit [Remote host closed the connection]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 264 seconds]
<cr1901> RobertJrdens[m]: https://docs.rs/idsp/latest/idsp/ Do you provide plain-old "I have a set of coefficients for an FIR filter and I just want to plug those into a struct and call filter()" functionality?
<JamesMunns[m]1> Robert Jördens ^
<cr1901> Or alternatively, "I have a set of coefficients for an FIR filter and I cannot be arsed to convert to SOS form"
<cr1901> (Oh right, SOS form is only for IIR, nvm)
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
<firefrommoonligh> Do you like Python?
<firefrommoonligh> I do something like this. See the commented-out python code. I paste the output in the rust coeffs:... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/ZZXIzdhmNbneeITTTXenCacc>)
<firefrommoonligh> So, the scipy.signal.iirfilter gets it in SOS. Then you run the line below to convert to the form the rust libs use
<cr1901> I have an FIR filter, so SOS doesn't apply
<cr1901> (AFAICT)
<cr1901> But I'll keep that in mind for the future. I just ran my stuff thru octave for tonight
<cr1901> >Do you like Python? <-- I do; I don't care for using numpy/scipy/notebooks unless I'm in the mood to play around for hours (which isn't tonight :P)
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
rmsyn[m] has joined #rust-embedded
<rmsyn[m]> re: the `Timer` trait, what if we expose two traits `Timer32` and `Timer64` for 32-bit and 64-bit timers, respectively. Then, 32-bit platforms could just implement the `Timer32` trait, and easily wrap `Timer64` to provide a 64-bit interface for drivers. For even smaller platforms, it may make sense to also do a `Timer8` and `Timer16`.
pronvis has quit [Ping timeout: 246 seconds]
<rmsyn[m]> alternatively, we could do a single `Timer` trait that requires 64-bit interfaces, and auto-implements 8-bit, 16-bit, 32-bit, and 128-bit interfaces
<rmsyn[m]> then, users could override the other interfaces for more efficient implementations