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
<newam[m]> Ahhh, thanks
<dirbaio[m]> these post-mono errors are super cursed
<dirbaio[m]> not even Rust devs know when they should trigger yet :D
<dirbaio[m]> they recently approved an RFC officially allowing these to be caught by `cargo build` but not `cargo check`
<dirbaio[m]> yep this particular assert is not caught by cargo check lol
<dirbaio[m]> only by cargo build
Guest7221 has joined #rust-embedded
<newam[m]> Do you know off the top of your head if that will have a runtime cost?
<newam[m]> O_o...
<newam[m]> Well miri isn't happy with it, that's not a good start
Guest7221 has left #rust-embedded [Error from remote client]
Guest7221 has joined #rust-embedded
Guest7221 has left #rust-embedded [Disconnected: Replaced by new connection]
dngrsspookyvisio has joined #rust-embedded
<dngrsspookyvisio> <JamesMunns[m]> "https://www.mattkeeter.com/blog/..."; <- oh *god* 💀
emerent has quit [Ping timeout: 255 seconds]
emerent has joined #rust-embedded
starblue has quit [Ping timeout: 255 seconds]
starblue has joined #rust-embedded
IlPalazzo-ojiisa has quit [Remote host closed the connection]
uep[m] has joined #rust-embedded
<uep[m]> oh shit.. "or we could have some fun" and I realise exactly what they are going to do to do the thing hinted at from the start
<thejpster[m]> diondokter: do you hang out with the binary side working group?
<diondokter[m]> thejpster[m]: I've found them on zulip, but haven't posted anything there yet
Guest7221 has joined #rust-embedded
<dav1d> Anyone of a OneWire protocol implementation for esp32 and embassy? I want to read from a DS18B20 temp sensor
crabbedhaloablut has joined #rust-embedded
zyla[m] has quit [Quit: Idle timeout reached: 172800s]
fu5ha[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has left #rust-embedded [Error from remote client]
Guest7221 has joined #rust-embedded
haobogu[m] has joined #rust-embedded
<haobogu[m]> Hi everyone, I'm wondering that is there any solution for Rust embedded to print memory usages after building a firmware? In my C project, I'm using -Wl,--gc-sections,--print-memory-usage flag for gcc and it prints something like the image
<diondokter[m]> You can install the cargo-binutils crate which will give you the cargo size command
<haobogu[m]> diondokter[m]: `cargo size` gives me the flash usage, but not ram usage
<diondokter[m]> It does, just not split out over the different regions
<diondokter[m]> data is stored in ram
IlPalazzo-ojiisa has joined #rust-embedded
<diondokter[m]> * data and bss is stored in ram
<haobogu[m]> Can I print the mem usage of sections defined in linker script?
<diondokter[m]> I don't know actually
<thejpster[m]> cargo size -- -A
<thejpster[m]> You can also pass linker flags to the linker (see .cargo/config.toml) so any linker flags you use with gcc probably work here too.
<thejpster[m]> (-Wl,xxx is a gcc flag which just passes the 'xxx' flag down to the linker)
<haobogu[m]> yeah, --print-memory-usage is a gcc ld specific flag, it doesn't work for llvm
<thejpster[m]> booo. I thought llvm lld did pretty much anything gcc ld did. Why not change the linker to use gcc then?
<thejpster[m]> Just add linker = "arm-none-eabi-gcc" to [target.thumbv7m-none-eabi]
<haobogu[m]> I tried but the gcc linker failed with arm-none-eabi/bin/ld: failed to merge target specific data of file error
<haobogu[m]> haobogu[m]: it says that the compiler uses VFP register arguments, but my project doesn't not. I don't know what's that mean..
<haobogu[m]> Anyway, `cargo size -- -A` prints what I need, thats bro thejpster
<haobogu[m]> thanks
<thejpster[m]> If you use gcc as a linker you possibly also need to give it "-mcpu=cortex-m4f" or something, and maybe "-nostdlib" and "-nostartfiles".
<thejpster[m]> Otherwise it'll try and link in libc, and if Rust made a bunch of object code that used the floating point unit (and put float arguments in floating point unit registers), but the C library didn't, I could see why it might complain.
ryan-summers[m] has joined #rust-embedded
<ryan-summers[m]> Small announcement (now that I'm back from vacation) for anyone interested - we're releasing 0.8.0 of minimq, a MQTTv5 MQTT client. This latest release makes it nearly feature-complete for the MQTTv5 stack, and it only takes up something like 17KB of flash based on my last measurements, so it's a really nice, small footprint solution for IoT projects and data analysis if you ever need it! https://crates.io/crates/minimq
<ryan-summers[m]> Also thanks Robert Jördens for the release on it :)
<ryan-summers[m]> s//`/, s/,/`,/, s/analysis/collection/
<diondokter[m]> Oh cool! Yet have to try it out. Though actually... maybe I've got an opportunity
<ryan-summers[m]> Just did a rework on memory management on it so that everything uses user-provided buffers like smoltcp, makes it really easy on stack usage for smaller devices.
<ryan-summers[m]> Although MQTT still needs to use ethernet, so small resource devices are probably still excluded
<ryan-summers[m]> * use ethernet + TCP stacks, so
<ryan-summers[m]> dirbaio: / newam re: heapless 0.8 - does it need a tag + changelog bump on Github as well? https://github.com/rust-embedded/heapless I'd PR if I knew which commit it was
<dav1d> ryan-summers[m], I assume I cant use your lib with async/embassy?
<ryan-summers[m]> First-class async support is on the horizon, but I don't see why you couldn't.
<ryan-summers[m]> Right now it has a poll() function similar to smoltcp
<dav1d> ah cool, Ill have to look into that, thanks!
korken89[m] has quit [Quit: Idle timeout reached: 172800s]
<newam[m]> <ryan-summers[m]> "dirbaio: / newam re: heapless 0..." <- 0.8 doesn't exist yet AFAIK, someone just bumped the version in Cargo.toml preemptively after breaking changes were added to the 0.7.x series.
<ryan-summers[m]> Oh you're right. Now I'm very confused, thanks for the clarification :)
Noah[m] has quit [Quit: Idle timeout reached: 172800s]
<firefrommoonligh> <ryan-summers[m]> "Small announcement (now that I'm..." <- V cool. Btw, I now do programming at work and we do a lot of MQTT stuff. I have been looking for excuses to build the projects in Rust! Fail so far as there's nothing on Django's level for web backend, and the Rust bindings for ML/CV are not in a usable state but... someday
<firefrommoonligh> > <@ryan-summers:matrix.org> Small announcement (now that I'm back from vacation) for anyone interested - we're releasing 0.8.0 of `minimq`, a MQTTv5 MQTT client. This latest release makes it nearly feature-complete for the MQTTv5 stack, and it only takes up something like 17KB of flash based on my last measurements, so it's a really nice, small footprint solution for IoT projects and data collection if you ever need it!
<firefrommoonligh> * V cool. Btw, I now do programming at a desk job, and we do a lot of MQTT stuff. I have been looking for excuses to build the projects in Rust! Fail so far as there's nothing on Django's level for web backend, and the Rust bindings for ML/CV are not in a usable state but... someday
<firefrommoonligh> (There are semi-official Rust OpenVINO and Tensorflow bindings, but they are out of date/high-build-friction)
<firefrommoonligh> * of date/missing critical features/high-build-friction)
<ryan-summers[m]> I use minimq a lot for even MQTT clients on host PCs honestly. Not the best API, but it works fine
<firefrommoonligh> V cool. Of note the [Paho MQTT](https://docs.rs/paho-mqtt/latest/paho_mqtt/) lib is what I was experimenting with; seemed solid, and similar to the C++ and Python ones
<firefrommoonligh> s/V cool/Nice/
<ryan-summers[m]> Yeah that's what I'd probably go with if I weren't no_std
GenTooMan has quit [Quit: Leaving]
GenTooMan has joined #rust-embedded
neceve has joined #rust-embedded
WSalmon has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
WSalmon has joined #rust-embedded
d3zd3z[m] has quit [Quit: Idle timeout reached: 172800s]
crabbedhaloablut has quit []
kenny has quit [Quit: WeeChat 4.0.5]
kenny has joined #rust-embedded
Guest7221 has left #rust-embedded [Error from remote client]
neceve has quit [Ping timeout: 240 seconds]
azzentys117[m] has quit [Quit: Idle timeout reached: 172800s]
WSalmon has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
WSalmon has joined #rust-embedded
Danilo[m] has joined #rust-embedded
<Danilo[m]> Hi folks! In https://github.com/dbrgn/embedded-hal-mock/pull/86 the maintenance question came up. Would you be interested in moving embedded-hal-mock to the rust-embedded GitHub organization? (I'd continue co-maintaining the library of course, as long as I find time to do it. But it might reduce the bus factor a bit more. ryankurte and newam are already co-maintainers.)
dsvsdveg[m] has quit [Quit: Idle timeout reached: 172800s]
andresovela[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has joined #rust-embedded
lulf[m]1 has quit [Quit: Idle timeout reached: 172800s]